summaryrefslogtreecommitdiffstats
path: root/Lib/encodings
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-09-30 11:22:28 (GMT)
committerGeorg Brandl <georg@python.org>2006-09-30 11:22:28 (GMT)
commita92979a1db11ca42e78390fead218afbefb61587 (patch)
tree31ffb065545fb96984f78853787b60e790bf370c /Lib/encodings
parent4ddfcd3b60b2c68f75a21a4f04b4a0f70caca7d5 (diff)
downloadcpython-a92979a1db11ca42e78390fead218afbefb61587.zip
cpython-a92979a1db11ca42e78390fead218afbefb61587.tar.gz
cpython-a92979a1db11ca42e78390fead218afbefb61587.tar.bz2
Bug #1446043: correctly raise a LookupError if an encoding name given
to encodings.search_function() contains a dot.
Diffstat (limited to 'Lib/encodings')
-rw-r--r--Lib/encodings/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/encodings/__init__.py b/Lib/encodings/__init__.py
index 82e517a..6cf6089 100644
--- a/Lib/encodings/__init__.py
+++ b/Lib/encodings/__init__.py
@@ -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,