[pypy-svn] r10551 - pypy/dist/pypy/translator/tool
arigo at codespeak.net
arigo at codespeak.net
Tue Apr 12 16:26:42 CEST 2005
Author: arigo
Date: Tue Apr 12 16:26:42 2005
New Revision: 10551
Modified:
pypy/dist/pypy/translator/tool/buildpyxmodule.py
Log:
Print the recorded error messages if importing a just-compiled module fails.
Modified: pypy/dist/pypy/translator/tool/buildpyxmodule.py
==============================================================================
--- pypy/dist/pypy/translator/tool/buildpyxmodule.py (original)
+++ pypy/dist/pypy/translator/tool/buildpyxmodule.py Tue Apr 12 16:26:42 2005
@@ -105,16 +105,16 @@
fdump = open("%s.errors" % modname, "w")
fdump.write(data)
fdump.close()
+ # XXX do we need to do some check on fout/ferr?
+ # XXX not a nice way to import a module
+ if debug: print "inserting path to sys.path", dirpath
+ sys.path.insert(0, '.')
+ if debug: print "import %(modname)s as testmodule" % locals()
+ exec "import %(modname)s as testmodule" % locals()
+ sys.path.pop(0)
except:
print data
raise
- # XXX do we need to do some check on fout/ferr?
- # XXX not a nice way to import a module
- if debug: print "inserting path to sys.path", dirpath
- sys.path.insert(0, '.')
- if debug: print "import %(modname)s as testmodule" % locals()
- exec "import %(modname)s as testmodule" % locals()
- sys.path.pop(0)
finally:
os.chdir(str(lastdir))
#if not debug:
More information about the Pypy-commit
mailing list