diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/encodings/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/encodings/__init__.py b/Lib/encodings/__init__.py index b928976..b2542b8 100644 --- a/Lib/encodings/__init__.py +++ b/Lib/encodings/__init__.py @@ -69,7 +69,9 @@ def search_function(encoding): globals(), locals(), _import_tail) except ImportError: import aliases - modname = aliases.aliases.get(modname, modname) + modname = (aliases.aliases.get(modname) or + aliases.aliases.get(modname.replace('.', '_')) or + modname) try: mod = __import__(modname, globals(), locals(), _import_tail) except ImportError: |