]> granicus.if.org Git - python/commitdiff
Fix read_mime_types() so that it returns a dict as documented.
authorWalter Dörwald <walter@livinglogic.de>
Fri, 3 Jan 2003 19:33:17 +0000 (19:33 +0000)
committerWalter Dörwald <walter@livinglogic.de>
Fri, 3 Jan 2003 19:33:17 +0000 (19:33 +0000)
This fixes a bug reported as http://www.python.org/sf/661630,
which was introduced in the patch http://www.python.org/sf/554192.

Lib/mimetypes.py

index 846d56b2cd5f3fb754d86740dd51cca7c92c7c69..f1a1a3e3cb48b4988d321fa7c7392c076e60b515 100644 (file)
@@ -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 = {