Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(14)

Unified Diff: Lib/mimetypes.py

Issue 20758: mimetypes initialization order
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/mimetypes.py Sun Feb 23 19:41:51 2014 +0100
+++ b/Lib/mimetypes.py Mon Feb 24 17:18:07 2014 +1100
@@ -252,10 +252,10 @@
with _winreg.OpenKey(_winreg.HKEY_CLASSES_ROOT, '') as hkcr:
for subkeyname in enum_types(hkcr):
try:
+ # Only check file extensions
+ if not subkeyname.startswith("."):
+ continue
with _winreg.OpenKey(hkcr, subkeyname) as subkey:
- # Only check file extensions
- if not subkeyname.startswith("."):
- continue
# raises EnvironmentError if no 'Content Type' value
mimetype, datatype = _winreg.QueryValueEx(
subkey, 'Content Type')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+