diff --git a/gns3server/modules/vmware/__init__.py b/gns3server/modules/vmware/__init__.py index c08d744d..aed44fc8 100644 --- a/gns3server/modules/vmware/__init__.py +++ b/gns3server/modules/vmware/__init__.py @@ -86,8 +86,8 @@ class VMware(BaseManager): ws_install_path, _ = winreg.QueryValueEx(hkey, "InstallPath") vmrun_ws = os.path.join(ws_install_path, "vmrun.exe") winreg.CloseKey(hkey) - if os.path.exists(vmrun_ws): - vmrun_path = vmrun_ws + if os.path.exists(vmrun_ws): + vmrun_path = vmrun_ws except OSError: pass else: @@ -97,8 +97,8 @@ class VMware(BaseManager): hkey = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\Wow6432Node\VMware, Inc.\VMware VIX") ws_install_path, _ = winreg.QueryValueEx(hkey, "InstallPath") vmrun_vix = os.path.join(ws_install_path, "vmrun.exe") - if os.path.exists(vmrun_vix): - vmrun_path = vmrun_vix + if os.path.exists(vmrun_vix): + vmrun_path = vmrun_vix elif sys.platform.startswith("darwin"): vmrun_path = "/Applications/VMware Fusion.app/Contents/Library/vmrun" else: