mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Make sure searchPath is always a string
This commit is contained in:
parent
8dab2a6696
commit
5e30fdf0fe
1 changed files with 2 additions and 0 deletions
|
@ -5,6 +5,8 @@ import subprocess
|
|||
|
||||
# A quick Python implementation of unix 'where' command.
|
||||
def where(exeName, searchPath=os.getenv("PATH")):
|
||||
if searchPath is None:
|
||||
searchPath = ""
|
||||
paths = searchPath.split(";" if sys.platform == "win32" else ":")
|
||||
for path in paths:
|
||||
candidatePath = os.path.join(path, exeName)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue