Show More
@@ -61,7 +61,7 b' class FileManagerMixin(object):' | |||||
61 | """context manager for turning permission errors into 403.""" |
|
61 | """context manager for turning permission errors into 403.""" | |
62 | try: |
|
62 | try: | |
63 | yield |
|
63 | yield | |
64 | except OSError as e: |
|
64 | except (OSError, IOError) as e: | |
65 | if e.errno in {errno.EPERM, errno.EACCES}: |
|
65 | if e.errno in {errno.EPERM, errno.EACCES}: | |
66 | # make 403 error message without root prefix |
|
66 | # make 403 error message without root prefix | |
67 | # this may not work perfectly on unicode paths on Python 2, |
|
67 | # this may not work perfectly on unicode paths on Python 2, |
General Comments 0
You need to be logged in to leave comments.
Login now