1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #22256 -- Replaced bad fallback for missing PATH

Thanks Baptiste Mispelon for the review.
Backport of acee46fc9 from master.
This commit is contained in:
Patrick Michaud
2014-03-22 16:52:05 +01:00
committed by Claude Paroz
parent 07e2a56814
commit 73474df954
3 changed files with 20 additions and 2 deletions

View File

@@ -56,7 +56,7 @@ def handle_extensions(extensions=('html',), ignored=('py',)):
def find_command(cmd, path=None, pathext=None):
if path is None:
path = os.environ.get('PATH', []).split(os.pathsep)
path = os.environ.get('PATH', '').split(os.pathsep)
if isinstance(path, six.string_types):
path = [path]
# check if there are funny path extensions for executables, e.g. Windows