mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-13 19:43:16 +08:00
Make sure searchPath is always a string
This commit is contained in:
parent
8dab2a6696
commit
5e30fdf0fe
@ -5,6 +5,8 @@ import subprocess
|
|||||||
|
|
||||||
# A quick Python implementation of unix 'where' command.
|
# A quick Python implementation of unix 'where' command.
|
||||||
def where(exeName, searchPath=os.getenv("PATH")):
|
def where(exeName, searchPath=os.getenv("PATH")):
|
||||||
|
if searchPath is None:
|
||||||
|
searchPath = ""
|
||||||
paths = searchPath.split(";" if sys.platform == "win32" else ":")
|
paths = searchPath.split(";" if sys.platform == "win32" else ":")
|
||||||
for path in paths:
|
for path in paths:
|
||||||
candidatePath = os.path.join(path, exeName)
|
candidatePath = os.path.join(path, exeName)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user