Skip to content

Commit

Permalink
On Py3, nonexistent files raise OSError (ansible#28899)
Browse files Browse the repository at this point in the history
  • Loading branch information
abadger authored and samdoran committed Aug 31, 2017
1 parent c95e03d commit e132918
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def _maintain_symlinks(symlink_type, base_path):
# only time we know that we're going to cache correctly
with open(SYMLINK_CACHE, 'r') as f:
symlink_data = json.loads(f.read())
except IOError as e:
except (IOError, OSError) as e:
# IOError on py2, OSError on py3. Both have errno
if e.errno == 2:
# SYMLINKS_CACHE doesn't exist. Fallback to trying to create the
# cache now. Will work if we're running directly from a git
Expand Down

0 comments on commit e132918

Please sign in to comment.