Skip to content

Commit

Permalink
Don't look up interpreter if it doesn't contain a -
Browse files Browse the repository at this point in the history
It turns out the underlying code errors pretty hard if the filename
doesn't contain a -. I haven't yet worked out why it's making the bad
lookup.
  • Loading branch information
illicitonion committed Nov 14, 2017
1 parent 91358f9 commit 5ebdb66
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/python/pants/backend/python/interpreter_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ def select_interpreter_for_targets(self, targets):

def _interpreter_from_path(self, path, filters):
interpreter_dir = os.path.basename(path)
if '-' not in interpreter_dir:
return None
identity = PythonIdentity.from_path(interpreter_dir)
try:
executable = os.readlink(os.path.join(path, 'python'))
Expand Down

0 comments on commit 5ebdb66

Please sign in to comment.