12345678910111213141516171819202122232425 |
- diff -Nur Python-2.5.2-old/Lib/email/__init__.py Python-2.5.2/Lib/email/__init__.py
- --- Python-2.5.2-old/Lib/email/__init__.py 2008-07-02 18:58:15.000000000 +0300
- +++ Python-2.5.2/Lib/email/__init__.py 2008-07-02 18:59:28.000000000 +0300
- @@ -109,15 +109,18 @@
- 'Text',
- ]
-
- +import string
- +lower_map = string.maketrans(string.ascii_uppercase, string.ascii_lowercase)
- +
- for _name in _LOWERNAMES:
- - importer = LazyImporter(_name.lower())
- + importer = LazyImporter(_name.translate(lower_map))
- sys.modules['email.' + _name] = importer
- setattr(sys.modules['email'], _name, importer)
-
-
- import email.mime
- for _name in _MIMENAMES:
- - importer = LazyImporter('mime.' + _name.lower())
- + importer = LazyImporter('mime.' + _name.translate(lower_map))
- sys.modules['email.MIME' + _name] = importer
- setattr(sys.modules['email'], 'MIME' + _name, importer)
- setattr(sys.modules['email.mime'], _name, importer)
|