Merge pull request #225 from selaselah/master

fix find_program() bug: no result in not-win sys
This commit is contained in:
Christopher Dunn 2015-03-31 11:32:06 -05:00
commit 244b1496e1

View File

@ -31,7 +31,7 @@ def find_program(*filenames):
paths = os.environ.get('PATH', '').split(os.pathsep)
suffixes = ('win32' in sys.platform) and '.exe .com .bat .cmd' or ''
for filename in filenames:
for name in [filename+ext for ext in suffixes.split()]:
for name in [filename+ext for ext in suffixes.split(' ')]:
for directory in paths:
full_path = os.path.join(directory, name)
if os.path.isfile(full_path):