From 45ca995deadac6c5a8953fe583e0ebb264619618 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Tue, 14 Apr 2015 14:32:44 +0200 Subject: [PATCH] Fix crash if VirtualBox doesn't return API version Fix #136 --- gns3server/modules/virtualbox/virtualbox_vm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gns3server/modules/virtualbox/virtualbox_vm.py b/gns3server/modules/virtualbox/virtualbox_vm.py index f369287b..2ff8511c 100644 --- a/gns3server/modules/virtualbox/virtualbox_vm.py +++ b/gns3server/modules/virtualbox/virtualbox_vm.py @@ -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))