Fixes some minor issues.

This commit is contained in:
grossmj 2015-09-29 14:15:01 -06:00
parent 8560521028
commit 80d99ec395
3 changed files with 8 additions and 4 deletions

View File

@ -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

View File

@ -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):

View File

@ -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: