summaryrefslogtreecommitdiffstats
path: root/Lib/encodings
diff options
context:
space:
mode:
authorMarc-André Lemburg <mal@egenix.com>2006-02-19 15:22:22 (GMT)
committerMarc-André Lemburg <mal@egenix.com>2006-02-19 15:22:22 (GMT)
commitfe4b34cc4b3d4c91497460d64c8ed1fe7a983689 (patch)
tree8fd4ca881b132668b1098cecb6ca710a962c30cc /Lib/encodings
parentc3e950cbf3ff3b44999356a046ab5b10a5bc7612 (diff)
downloadcpython-fe4b34cc4b3d4c91497460d64c8ed1fe7a983689.zip
cpython-fe4b34cc4b3d4c91497460d64c8ed1fe7a983689.tar.gz
cpython-fe4b34cc4b3d4c91497460d64c8ed1fe7a983689.tar.bz2
Fix the encodings package codec search function to only search
inside its own package. Fixes problem reported in patch #1433198. Add codec search function for codec test codec.
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 8a50ac1..01463bc 100644
--- a/Lib/encodings/__init__.py
+++ b/Lib/encodings/__init__.py
@@ -91,7 +91,7 @@ def search_function(encoding):
if not modname:
continue
try:
- mod = __import__(modname,
+ mod = __import__('encodings.' + modname,
globals(), locals(), _import_tail)
except ImportError:
pass