From dd7f6eb021bd6fafe8f406510b22df5d2e7d3a9a Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Fri, 2 Oct 2015 15:04:42 +0200 Subject: [PATCH] Fix crash --- gns3server/modules/vmware/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gns3server/modules/vmware/__init__.py b/gns3server/modules/vmware/__init__.py index 21e0737f7..4cc4231ef 100644 --- a/gns3server/modules/vmware/__init__.py +++ b/gns3server/modules/vmware/__init__.py @@ -171,7 +171,7 @@ class VMware(BaseManager): if sys.platform.startswith("darwin"): return # FIXME: no version checking on Mac OS X else: - vmware_path = self._get_linux_vmware_binary() + vmware_path = VMware._get_linux_vmware_binary() if vmware_path is None: raise VMwareError("VMware is not installed (vmware executable could not be found in $PATH)") @@ -438,7 +438,7 @@ class VMware(BaseManager): with open(path, "w", encoding=encoding, errors="ignore") as f: if sys.platform.startswith("linux"): # write the shebang on the first line on Linux - vmware_path = self._get_linux_vmware_binary() + vmware_path = VMware._get_linux_vmware_binary() if vmware_path: f.write("#!{}\n".format(vmware_path)) for key, value in pairs.items(): @@ -578,7 +578,8 @@ class VMware(BaseManager): raise VMwareError('Could not find the default VM directory: "{}"'.format(default_vm_path)) return self._get_vms_from_directory(default_vm_path) - def _get_linux_vmware_binary(self): + @staticmethod + def _get_linux_vmware_binary(): """ Return the path of the vmware binary on Linux or None """