mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-30 17:46:59 +00:00
Fix switching console type from telnet to VNC throws error.
This commit is contained in:
parent
6caf38206c
commit
34fcbd68f3
@ -118,7 +118,8 @@ class QEMUHandler:
|
|||||||
|
|
||||||
qemu_manager = Qemu.instance()
|
qemu_manager = Qemu.instance()
|
||||||
vm = qemu_manager.get_node(request.match_info["node_id"], project_id=request.match_info["project_id"])
|
vm = qemu_manager.get_node(request.match_info["node_id"], project_id=request.match_info["project_id"])
|
||||||
|
# update the console first to avoid issue if updating console type
|
||||||
|
vm.console = request.json.pop("console", vm.console)
|
||||||
for name, value in request.json.items():
|
for name, value in request.json.items():
|
||||||
if hasattr(vm, name) and getattr(vm, name) != value:
|
if hasattr(vm, name) and getattr(vm, name) != value:
|
||||||
setattr(vm, name, value)
|
setattr(vm, name, value)
|
||||||
|
Loading…
Reference in New Issue
Block a user