[issue44159] mimetypes - "strict" on Windows
Norman Lorrain
report at bugs.python.org
Mon May 17 16:07:31 EDT 2021
Norman Lorrain <normanlorrain at gmail.com> added the comment:
Possible solution is to read the Windows Registry entries, assigning those entries as "strict=False". Unit tests pass with this change:
diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py
index 018793c4f0..dd2bddf064 100644
--- a/Lib/mimetypes.py
+++ b/Lib/mimetypes.py
@@ -350,7 +350,7 @@ def init(files=None):
if files is None or _db is None:
db = MimeTypes()
if _winreg:
- db.read_windows_registry()
+ db.read_windows_registry(strict = False)
if files is None:
files = knownfiles
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44159>
_______________________________________
More information about the Python-bugs-list
mailing list