Bug #1446043: correctly raise a LookupError if an encoding name given
to encodings.search_function() contains a dot.
This commit is contained in:
parent
4ddfcd3b60
commit
a92979a1db
|
@ -90,7 +90,7 @@ def search_function(encoding):
|
|||
else:
|
||||
modnames = [norm_encoding]
|
||||
for modname in modnames:
|
||||
if not modname:
|
||||
if not modname or '.' in modname:
|
||||
continue
|
||||
try:
|
||||
mod = __import__('encodings.' + modname,
|
||||
|
|
Loading…
Reference in New Issue