mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-20 21:33:09 +00:00
Fixes some minor issues.
This commit is contained in:
parent
8560521028
commit
80d99ec395
@ -237,7 +237,7 @@ class BaseManager:
|
||||
@asyncio.coroutine
|
||||
def close_vm(self, vm_id):
|
||||
"""
|
||||
Delete a VM
|
||||
Close a VM
|
||||
|
||||
:param vm_id: VM identifier
|
||||
|
||||
@ -305,6 +305,7 @@ class BaseManager:
|
||||
|
||||
vm = yield from self.close_vm(vm_id)
|
||||
vm.project.mark_vm_for_destruction(vm)
|
||||
if vm.id in self._vms:
|
||||
del self._vms[vm.id]
|
||||
return vm
|
||||
|
||||
|
@ -357,7 +357,10 @@ class Dynamips(BaseManager):
|
||||
ghost_ios_support = self.config.get_section_config("Dynamips").getboolean("ghost_ios_support", True)
|
||||
if ghost_ios_support:
|
||||
with (yield from Dynamips._ghost_ios_lock):
|
||||
try:
|
||||
yield from self._set_ghost_ios(vm)
|
||||
except GeneratorExit:
|
||||
log.warning("Could not create ghost IOS image {} (GeneratorExit)".format(vm.name))
|
||||
|
||||
@asyncio.coroutine
|
||||
def create_nio(self, node, nio_settings):
|
||||
|
@ -279,7 +279,7 @@ class VirtualBoxVM(BaseVM):
|
||||
try:
|
||||
with open(hdd_info_file, "r", encoding="utf-8") as f:
|
||||
hdd_table = json.load(f)
|
||||
except OSError as e:
|
||||
except (ValueError, OSError) as e:
|
||||
raise VirtualBoxError("Could not read HDD info file: {}".format(e))
|
||||
|
||||
for hdd_info in hdd_table:
|
||||
|
Loading…
Reference in New Issue
Block a user