From a8193fa0635efeefd92216ac185c013a69a9fb89 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sun, 28 Sep 2014 18:23:27 -0600 Subject: [PATCH] Split the PATH environment variable using os.pathsep --- gns3server/modules/dynamips/__init__.py | 2 +- gns3server/modules/iou/__init__.py | 2 +- gns3server/modules/qemu/__init__.py | 2 +- gns3server/modules/virtualbox/__init__.py | 2 +- gns3server/modules/vpcs/__init__.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gns3server/modules/dynamips/__init__.py b/gns3server/modules/dynamips/__init__.py index afd33ff3..a35a71c5 100644 --- a/gns3server/modules/dynamips/__init__.py +++ b/gns3server/modules/dynamips/__init__.py @@ -111,7 +111,7 @@ class Dynamips(IModule): dynamips_config = config.get_section_config(name.upper()) self._dynamips = dynamips_config.get("dynamips_path") if not self._dynamips or not os.path.isfile(self._dynamips): - paths = [os.getcwd()] + os.environ["PATH"].split(":") + paths = [os.getcwd()] + os.environ["PATH"].split(os.pathsep) # look for Dynamips in the current working directory and $PATH for path in paths: try: diff --git a/gns3server/modules/iou/__init__.py b/gns3server/modules/iou/__init__.py index f72cf5e9..648223bf 100644 --- a/gns3server/modules/iou/__init__.py +++ b/gns3server/modules/iou/__init__.py @@ -68,7 +68,7 @@ class IOU(IModule): iou_config = config.get_section_config(name.upper()) self._iouyap = iou_config.get("iouyap_path") if not self._iouyap or not os.path.isfile(self._iouyap): - paths = [os.getcwd()] + os.environ["PATH"].split(":") + paths = [os.getcwd()] + os.environ["PATH"].split(os.pathsep) # look for iouyap in the current working directory and $PATH for path in paths: try: diff --git a/gns3server/modules/qemu/__init__.py b/gns3server/modules/qemu/__init__.py index ba40f028..754ffbbf 100644 --- a/gns3server/modules/qemu/__init__.py +++ b/gns3server/modules/qemu/__init__.py @@ -619,7 +619,7 @@ class Qemu(IModule): """ qemus = [] - paths = [os.getcwd()] + os.environ["PATH"].split(":") + paths = [os.getcwd()] + os.environ["PATH"].split(os.pathsep) # look for Qemu binaries in the current working directory and $PATH if sys.platform.startswith("win"): # add specific Windows paths diff --git a/gns3server/modules/virtualbox/__init__.py b/gns3server/modules/virtualbox/__init__.py index d7af5c48..0d2a97fc 100644 --- a/gns3server/modules/virtualbox/__init__.py +++ b/gns3server/modules/virtualbox/__init__.py @@ -67,7 +67,7 @@ class VirtualBox(IModule): vbox_config = config.get_section_config(name.upper()) self._vboxwrapper_path = vbox_config.get("vboxwrapper_path") if not self._vboxwrapper_path or not os.path.isfile(self._vboxwrapper_path): - paths = [os.getcwd()] + os.environ["PATH"].split(":") + paths = [os.getcwd()] + os.environ["PATH"].split(os.pathsep) # look for vboxwrapper in the current working directory and $PATH for path in paths: try: diff --git a/gns3server/modules/vpcs/__init__.py b/gns3server/modules/vpcs/__init__.py index 0420175f..b88324a4 100644 --- a/gns3server/modules/vpcs/__init__.py +++ b/gns3server/modules/vpcs/__init__.py @@ -63,7 +63,7 @@ class VPCS(IModule): vpcs_config = config.get_section_config(name.upper()) self._vpcs = vpcs_config.get("vpcs_path") if not self._vpcs or not os.path.isfile(self._vpcs): - paths = [os.getcwd()] + os.environ["PATH"].split(":") + paths = [os.getcwd()] + os.environ["PATH"].split(os.pathsep) # look for VPCS in the current working directory and $PATH for path in paths: try: