[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

Antoine Pitrou report at bugs.python.org
Sat Jun 26 01:35:32 CEST 2010


Antoine Pitrou <pitrou at free.fr> added the comment:

Can't reproduce under Mandriva Linux:

>>> import mimetypes
>>> print(mimetypes.guess_extension('image/jpeg'))
.jpe
>>> mimetypes.init()
>>> print(mimetypes.guess_extension('image/jpeg'))
.jpe

The fact that it returns ".jpe" rather than ".jpg", however, could be a bug in itself (since the latter will really be expected by everyone, not the former).

----------
nosy: +pitrou

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4963>
_______________________________________


More information about the Python-bugs-list mailing list