[issue18670] Using read_mime_types function from mimetypes module gives resource warning

Martin Panter report at bugs.python.org
Fri Oct 27 18:09:33 EDT 2017


Martin Panter <vadmium+py at gmail.com> added the comment:

The patches would mask an OSError raised by the “readfp” call, which would be a change in behaviour. But moving the call does not seem to be necessary; why not leave it outside the “try” statement?

----------
nosy: +martin.panter

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18670>
_______________________________________


More information about the Python-bugs-list mailing list