summaryrefslogtreecommitdiffstats
path: root/Lib/mimetypes.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/mimetypes.py')
-rw-r--r--Lib/mimetypes.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py
index 7532383..3e1c3cf 100644
--- a/Lib/mimetypes.py
+++ b/Lib/mimetypes.py
@@ -90,6 +90,8 @@ class MimeTypes:
list of standard types, else to the list of non-standard
types.
"""
+ if not type:
+ return
self.types_map[strict][ext] = type
exts = self.types_map_inv[strict].setdefault(type, [])
if ext not in exts: