[issue38672] Crash on mimetypes.init() if there is no access to one of knownfiles

2019-11-03 Thread SilentGhost
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,

[issue38672] Crash on mimetypes.init() if there is no access to one of knownfiles

2019-11-03 Thread Michał Szymaniak
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