1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-15 21:08:55 +00:00

Fix crash if VirtualBox doesn't return API version

Fix #136
This commit is contained in:
Julien Duponchelle 2015-04-14 14:32:44 +02:00
parent af942dc419
commit 45ca995dea

View File

@ -139,6 +139,8 @@ class VirtualBoxVM(BaseVM):
def create(self):
yield from self._get_system_properties()
if "API version" not in self._system_properties:
raise VirtualBoxError("Can't access to VirtualBox API Version")
if parse_version(self._system_properties["API version"]) < parse_version("4_3"):
raise VirtualBoxError("The VirtualBox API version is lower than 4.3")
log.info("VirtualBox VM '{name}' [{id}] created".format(name=self.name, id=self.id))