mirror of
https://github.com/GNS3/gns3-server
synced 2025-01-12 09:00:57 +00:00
Catch VirtualBox errors when listing VMs. Fixes #1759
This commit is contained in:
parent
00f8a27404
commit
7002b026fc
@ -212,8 +212,11 @@ class VirtualBoxGNS3VM(BaseGNS3VM):
|
|||||||
List all VirtualBox VMs
|
List all VirtualBox VMs
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
try:
|
||||||
await self._check_requirements()
|
await self._check_requirements()
|
||||||
return await self._virtualbox_manager.list_vms()
|
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):
|
async def start(self):
|
||||||
"""
|
"""
|
||||||
|
@ -115,6 +115,7 @@ class VMwareGNS3VM(BaseGNS3VM):
|
|||||||
"""
|
"""
|
||||||
List all VMware VMs
|
List all VMware VMs
|
||||||
"""
|
"""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return (await self._vmware_manager.list_vms())
|
return (await self._vmware_manager.list_vms())
|
||||||
except VMwareError as e:
|
except VMwareError as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user