1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-25 00:08:11 +00:00

Split the PATH environment variable using os.pathsep

This commit is contained in:
grossmj 2014-09-28 18:23:27 -06:00
parent 6dce005594
commit a8193fa063
5 changed files with 5 additions and 5 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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

View File

@ -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:

View File

@ -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: