mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 17:28:08 +00: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())
|
dynamips_config = config.get_section_config(name.upper())
|
||||||
self._dynamips = dynamips_config.get("dynamips_path")
|
self._dynamips = dynamips_config.get("dynamips_path")
|
||||||
if not self._dynamips or not os.path.isfile(self._dynamips):
|
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
|
# look for Dynamips in the current working directory and $PATH
|
||||||
for path in paths:
|
for path in paths:
|
||||||
try:
|
try:
|
||||||
|
@ -68,7 +68,7 @@ class IOU(IModule):
|
|||||||
iou_config = config.get_section_config(name.upper())
|
iou_config = config.get_section_config(name.upper())
|
||||||
self._iouyap = iou_config.get("iouyap_path")
|
self._iouyap = iou_config.get("iouyap_path")
|
||||||
if not self._iouyap or not os.path.isfile(self._iouyap):
|
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
|
# look for iouyap in the current working directory and $PATH
|
||||||
for path in paths:
|
for path in paths:
|
||||||
try:
|
try:
|
||||||
|
@ -619,7 +619,7 @@ class Qemu(IModule):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
qemus = []
|
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
|
# look for Qemu binaries in the current working directory and $PATH
|
||||||
if sys.platform.startswith("win"):
|
if sys.platform.startswith("win"):
|
||||||
# add specific Windows paths
|
# add specific Windows paths
|
||||||
|
@ -67,7 +67,7 @@ class VirtualBox(IModule):
|
|||||||
vbox_config = config.get_section_config(name.upper())
|
vbox_config = config.get_section_config(name.upper())
|
||||||
self._vboxwrapper_path = vbox_config.get("vboxwrapper_path")
|
self._vboxwrapper_path = vbox_config.get("vboxwrapper_path")
|
||||||
if not self._vboxwrapper_path or not os.path.isfile(self._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
|
# look for vboxwrapper in the current working directory and $PATH
|
||||||
for path in paths:
|
for path in paths:
|
||||||
try:
|
try:
|
||||||
|
@ -63,7 +63,7 @@ class VPCS(IModule):
|
|||||||
vpcs_config = config.get_section_config(name.upper())
|
vpcs_config = config.get_section_config(name.upper())
|
||||||
self._vpcs = vpcs_config.get("vpcs_path")
|
self._vpcs = vpcs_config.get("vpcs_path")
|
||||||
if not self._vpcs or not os.path.isfile(self._vpcs):
|
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
|
# look for VPCS in the current working directory and $PATH
|
||||||
for path in paths:
|
for path in paths:
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user