diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py index 1f2c9d6a876..ddd1fa40125 100644 --- a/Lib/mimetypes.py +++ b/Lib/mimetypes.py @@ -215,9 +215,8 @@ class MimeTypes: if not words: continue type, suffixes = words[0], words[1:] - suffixes = [ '.' + suff for suff in suffixes ] for suff in suffixes: - self.add_type(type, suff, strict) + self.add_type(type, '.' + suff, strict) def guess_type(url, strict=True): """Guess the type of a file based on its URL.