mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 17:28:08 +00:00
Fix error while getting appliance list. Fixes #1258.
This commit is contained in:
parent
ed275e4ec5
commit
ffc7024b64
@ -123,8 +123,13 @@ class Controller:
|
|||||||
if prop in ["enable_remote_console", "use_ubridge"]:
|
if prop in ["enable_remote_console", "use_ubridge"]:
|
||||||
del vm[prop]
|
del vm[prop]
|
||||||
vm.setdefault("appliance_id", str(uuid.uuid4()))
|
vm.setdefault("appliance_id", str(uuid.uuid4()))
|
||||||
|
try:
|
||||||
appliance = Appliance(vm["appliance_id"], vm)
|
appliance = Appliance(vm["appliance_id"], vm)
|
||||||
self._appliances[appliance.id] = appliance
|
self._appliances[appliance.id] = appliance
|
||||||
|
except KeyError as e:
|
||||||
|
# appliance data is not complete (missing name or type)
|
||||||
|
log.warning("Could not load appliance template {} ('{}'): {}".format(vm["appliance_id"], vm.get("name", "unknown"), e))
|
||||||
|
continue
|
||||||
|
|
||||||
# Add builtins
|
# Add builtins
|
||||||
builtins = []
|
builtins = []
|
||||||
|
Loading…
Reference in New Issue
Block a user