Skip to content

Commit

Permalink
Simplify try_create.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirois committed Jun 25, 2019
1 parent 247a652 commit a29bc33
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pex/pex_bootstrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@

def _find_pex_python(pex_python):
def try_create(try_path):
if os.path.exists(try_path):
try:
return PythonInterpreter.from_binary(try_path)
except Executor.ExecutionError:
pass
return None
try:
return PythonInterpreter.from_binary(try_path)
except Executor.ExecutionError:
return None

interpreter = try_create(pex_python)
if interpreter:
Expand Down

0 comments on commit a29bc33

Please sign in to comment.