[pypy-svn] r60166 - pypy/trunk/pypy/lib

xoraxax at codespeak.net xoraxax at codespeak.net
Wed Nov 26 18:18:05 CET 2008


Author: xoraxax
Date: Wed Nov 26 18:18:05 2008
New Revision: 60166

Modified:
   pypy/trunk/pypy/lib/_locale.py
Log:
Raise import error if first configure call fails. Should probably be moved into a separate feature of configure().

Modified: pypy/trunk/pypy/lib/_locale.py
==============================================================================
--- pypy/trunk/pypy/lib/_locale.py	(original)
+++ pypy/trunk/pypy/lib/_locale.py	Wed Nov 26 18:18:05 2008
@@ -36,7 +36,12 @@
 for key in _CONSTANTS:
     setattr(LocaleConfigure, key, ConstantInteger(key))
 
-locale_config = configure(LocaleConfigure)
+try:
+    locale_config = configure(LocaleConfigure)
+except Exception, e:
+    # should probably be moved into configure()
+    # as an optional feature
+    raise ImportError("%s: %s" % (e.__class__, e))
 
 for key in _CONSTANTS:
     globals()[key] = locale_config[key]



More information about the Pypy-commit mailing list