From 05ab18f2950c4a2faf14c06a28df6ec12d2bd3a0 Mon Sep 17 00:00:00 2001 From: grossmj Date: Thu, 6 Aug 2015 23:05:10 -0600 Subject: [PATCH] Send an error when vmware executable cannot be found on Linux. Fixes #288. --- gns3server/modules/vmware/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gns3server/modules/vmware/__init__.py b/gns3server/modules/vmware/__init__.py index 843af949..782e15f9 100644 --- a/gns3server/modules/vmware/__init__.py +++ b/gns3server/modules/vmware/__init__.py @@ -172,6 +172,9 @@ class VMware(BaseManager): else: vmware_path = shutil.which("vmware") + if vmware_path is None: + raise VMwareError("VMware is not installed (vmware executable could not be found in $PATH)") + try: output = yield from subprocess_check_output(vmware_path, "-v") match = re.search("VMware Workstation ([0-9]+)\.", output)