summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-03-31 17:25:23 (GMT)
committerGuido van Rossum <guido@python.org>2000-03-31 17:25:23 (GMT)
commitb95de4f847c04f2b82f75e27e477afd229a189b1 (patch)
treea83e7bc4e6f69c0bf0ae52dd8d245cbb75319e1f /Lib
parent52a644cbda06985def76b077e541a88d1f60e61d (diff)
downloadcpython-b95de4f847c04f2b82f75e27e477afd229a189b1.zip
cpython-b95de4f847c04f2b82f75e27e477afd229a189b1.tar.gz
cpython-b95de4f847c04f2b82f75e27e477afd229a189b1.tar.bz2
Marc-Andre Lemburg: Error reporting in the codec registry and lookup
mechanism is enhanced to be more informative.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/codecs.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/codecs.py b/Lib/codecs.py
index c09f804..5c669c0 100644
--- a/Lib/codecs.py
+++ b/Lib/codecs.py
@@ -11,7 +11,11 @@ import struct,types,__builtin__
### Registry and builtin stateless codec functions
-from _codecs import *
+try:
+ from _codecs import *
+except ImportError,why:
+ raise SystemError,\
+ 'Failed to load the builtin codecs: %s' % why
### Constants