1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-24 15:58:08 +00:00

Catch VirtualBox errors when listing VMs. Fixes #1759

This commit is contained in:
grossmj 2020-05-20 18:42:50 +09:30
parent 00f8a27404
commit 7002b026fc
2 changed files with 6 additions and 2 deletions

View File

@ -212,8 +212,11 @@ class VirtualBoxGNS3VM(BaseGNS3VM):
List all VirtualBox VMs
"""
await self._check_requirements()
return await self._virtualbox_manager.list_vms()
try:
await self._check_requirements()
return await self._virtualbox_manager.list_vms()
except VirtualBoxError as e:
raise GNS3VMError("Could not list VirtualBox VMs: {}".format(str(e)))
async def start(self):
"""

View File

@ -115,6 +115,7 @@ class VMwareGNS3VM(BaseGNS3VM):
"""
List all VMware VMs
"""
try:
return (await self._vmware_manager.list_vms())
except VMwareError as e: