[pypy-svn] r32268 - pypy/dist/pypy/interpreter
arigo at codespeak.net
arigo at codespeak.net
Wed Sep 13 17:49:16 CEST 2006
Author: arigo
Date: Wed Sep 13 17:49:15 2006
New Revision: 32268
Modified:
pypy/dist/pypy/interpreter/mixedmodule.py
Log:
Don't eat the traceback here...
Modified: pypy/dist/pypy/interpreter/mixedmodule.py
==============================================================================
--- pypy/dist/pypy/interpreter/mixedmodule.py (original)
+++ pypy/dist/pypy/interpreter/mixedmodule.py Wed Sep 13 17:49:15 2006
@@ -3,7 +3,7 @@
from pypy.interpreter import gateway
from pypy.interpreter.error import OperationError
from pypy.interpreter.baseobjspace import W_Root
-import os
+import os, sys
import inspect
@@ -131,8 +131,14 @@
raise # propagate the NameError
try:
d[name] = __import__(pkgroot+'.'+name, None, None, [name])
- except ImportError:
- d[name] = __import__(name, None, None, [name])
+ except ImportError:
+ etype, evalue, etb = sys.exc_info()
+ try:
+ d[name] = __import__(name, None, None, [name])
+ except ImportError:
+ # didn't help, re-raise the original exception for
+ # clarity
+ raise etype, evalue, etb
else:
#print spec, "->", value
if hasattr(value, 'func_code'): # semi-evil
More information about the Pypy-commit
mailing list