Skip to content

Commit

Permalink
Fix #51
Browse files Browse the repository at this point in the history
  • Loading branch information
jpattWPC committed Mar 10, 2023
1 parent 715dfef commit b382d69
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/vdiclient.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"upgrade_guid" : "46cbad92-353e-4b28-9bee-83950991dad8",
"version" : "1.1.02",
"version" : "1.1.03",
"product_name" : "VDI Client",
"manufacturer" : "Josh Patten",
"name" : "VDI Client",
Expand Down
12 changes: 8 additions & 4 deletions vdiclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,14 @@ def vmaction(vmnode, vmid, vmtype):
if startpop:
startpop.close()
return status
if vmtype == 'qemu':
spiceconfig = G.proxmox.nodes(vmnode).qemu(str(vmid)).spiceproxy.post()
else: # Not sure this is even a thing, but here it is...
spiceconfig = G.proxmox.nodes(vmnode).lxc(str(vmid)).spiceproxy.post()
try:
if vmtype == 'qemu':
spiceconfig = G.proxmox.nodes(vmnode).qemu(str(vmid)).spiceproxy.post()
else: # Not sure this is even a thing, but here it is...
spiceconfig = G.proxmox.nodes(vmnode).lxc(str(vmid)).spiceproxy.post()
except proxmoxer.core.ResourceException as e:
win_popup_button(f"Unable to connect to VM {vmid}:\n{e!r}\nIs SPICE display configured for your VM?", 'OK')
return False
confignode = ConfigParser()
confignode['virt-viewer'] = {}
for key, value in spiceconfig.items():
Expand Down

0 comments on commit b382d69

Please sign in to comment.