SilentGhost added the comment:
The fix seems fairly obvious: replacing isfile check with try-catch statement
for all OSErrors. Would you like to submit a pull request, Michał?
--
nosy: +SilentGhost
stage: -> test needed
type: crash -> behavior
versions: -Python 2.7, Python 3.5,
New submission from Michał Szymaniak :
When user lacks rights to read on of the mimetypes.knownfiles, mimetypes init()
will throw PermissionError and library becomes unusable.
Reproduction steps:
# mkdir -p /etc/httpd/conf/
# touch /etc/httpd/conf/mime.types
# chmod a-r