From: Walter Dörwald Date: Fri, 3 Jan 2003 19:33:17 +0000 (+0000) Subject: Fix read_mime_types() so that it returns a dict as documented. X-Git-Tag: v2.3c1~2616 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bb51ed333b623b6acf90a34ec6da9b4d076503e5;p=python Fix read_mime_types() so that it returns a dict as documented. This fixes a bug reported as http://www.python.org/sf/661630, which was introduced in the patch http://www.python.org/sf/554192. --- diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py index 846d56b2cd..f1a1a3e3cb 100644 --- a/Lib/mimetypes.py +++ b/Lib/mimetypes.py @@ -315,8 +315,8 @@ def read_mime_types(file): except IOError: return None db = MimeTypes() - db.readfp(f) - return db.types_map + db.readfp(f, True) + return db.types_map[True] suffix_map = {