diff options
author | Toshio Kuratomi <a.badger@gmail.com> | 2017-08-31 14:47:26 -0700 |
---|---|---|
committer | Sam Doran <sdoran@ansible.com> | 2017-08-31 17:47:26 -0400 |
commit | e132918b925108e7d5cba5bc3ded2c5aea272fff (patch) | |
tree | 034a0cd75db7b84c737e98e0d8c3eebae4687790 /setup.py | |
parent | c95e03d213fe24080eb2dd9b8bfdecc85a5d10eb (diff) | |
download | ansible-e132918b925108e7d5cba5bc3ded2c5aea272fff.tar.gz |
On Py3, nonexistent files raise OSError (#28899)
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |