From 98537a242abc1f9ecdb10f091f73e01264436d70 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Mon, 1 Feb 2016 16:05:37 +0100 Subject: [PATCH] Drop duplicate code when ubridge is too old Fix #405 --- gns3server/modules/base_vm.py | 2 -- gns3server/ubridge/hypervisor.py | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/gns3server/modules/base_vm.py b/gns3server/modules/base_vm.py index 5775182f..ed9cf56d 100644 --- a/gns3server/modules/base_vm.py +++ b/gns3server/modules/base_vm.py @@ -330,8 +330,6 @@ class BaseVM: yield from self._ubridge_hypervisor.start() log.info("Hypervisor {}:{} has successfully started".format(self._ubridge_hypervisor.host, self._ubridge_hypervisor.port)) yield from self._ubridge_hypervisor.connect() - if parse_version(self._ubridge_hypervisor.version) < parse_version('0.9.3'): - raise VMError("uBridge version must be >= 0.9.3, detected version is {}".format(self._ubridge_hypervisor.version)) @property def hw_virtualization(self): diff --git a/gns3server/ubridge/hypervisor.py b/gns3server/ubridge/hypervisor.py index 2698f1bd..7a01d110 100644 --- a/gns3server/ubridge/hypervisor.py +++ b/gns3server/ubridge/hypervisor.py @@ -119,15 +119,15 @@ class Hypervisor(UBridgeHypervisor): @asyncio.coroutine def _check_ubridge_version(self): """ - Checks if the ubridge executable version is >= 0.9.1 + Checks if the ubridge executable version is >= 0.9.3 """ try: output = yield from subprocess_check_output(self._path, "-v", cwd=self._working_dir) match = re.search("ubridge version ([0-9a-z\.]+)", output) if match: version = match.group(1) - if parse_version(version) < parse_version("0.9.1"): - raise UbridgeError("uBridge executable version must be >= 0.9.1") + if parse_version(version) < parse_version("0.9.3"): + raise UbridgeError("uBridge executable version must be >= 0.9.3") else: raise UbridgeError("Could not determine uBridge version for {}".format(self._path)) except (OSError, subprocess.SubprocessError) as e: