Bug #1446043: correctly raise a LookupError if an encoding name given
to encodings.search_function() contains a dot. (backport from rev. 52075)
This commit is contained in:
parent
6d7c36332f
commit
1206a933cc
|
@ -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