summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lib/mimetypes.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py
index b98c8749f6..d64726b80f 100644
--- a/Lib/mimetypes.py
+++ b/Lib/mimetypes.py
@@ -246,7 +246,8 @@ class MimeTypes:
except EnvironmentError:
break
else:
- yield ctype
+ if '\0' not in ctype:
+ yield ctype
i += 1
with _winreg.OpenKey(_winreg.HKEY_CLASSES_ROOT, '') as hkcr: