mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-11-16 16:54:51 +02:00
Split the PATH environment variable using os.pathsep
This commit is contained in:
parent
6dce005594
commit
a8193fa063
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user