Browse Source

Make sure searchPath is always a string

Ian Paschal 6 years ago
parent
commit
5e30fdf0fe
1 changed files with 2 additions and 0 deletions
  1. 2 0
      run_mypy.py

+ 2 - 0
run_mypy.py

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