Handle EPERM when writing rewritten bytecode.

Fixes #1143.
This commit is contained in:
Florian Bruhin 2015-10-17 11:50:49 +02:00
parent 3404d2a99b
commit 2956627b8b
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ class AssertionRewritingHook(object):
# One of the path components was not a directory, likely
# because we're in a zip file.
write = False
elif e in [errno.EACCES, errno.EROFS]:
elif e in [errno.EACCES, errno.EROFS, errno.EPERM]:
state.trace("read only directory: %r" % fn_pypath.dirname)
write = False
else: