diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py index b98c8749f63..d64726b80fb 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: