Skip to content

Commit 019b010

Browse files
committed
Merge pull request #98 from rackerlabs/fix_locate_exec
Handle find_executable returning None or ''
2 parents 910b799 + 6df5ac2 commit 019b010

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lambda_uploader/package.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,10 @@ def _isfile(path):
272272

273273
def _python_executable():
274274
python_exe = find_executable('python2')
275-
if python_exe is '':
275+
if not python_exe:
276276
python_exe = find_executable('python')
277277

278-
if python_exe is '':
278+
if not python_exe:
279279
raise Exception('Unable to locate python executable')
280280

281281
return python_exe

0 commit comments

Comments
 (0)