[pypy-svn] r17799 - pypy/dist/pypy/module/__builtin__

arigo at codespeak.net arigo at codespeak.net
Fri Sep 23 19:04:30 CEST 2005


Author: arigo
Date: Fri Sep 23 19:04:29 2005
New Revision: 17799

Modified:
   pypy/dist/pypy/module/__builtin__/importing.py
Log:
Produce the same error message as CPython.  For incredibly bad reasons
this is required to make help() work correctly.


Modified: pypy/dist/pypy/module/__builtin__/importing.py
==============================================================================
--- pypy/dist/pypy/module/__builtin__/importing.py	(original)
+++ pypy/dist/pypy/module/__builtin__/importing.py	Fri Sep 23 19:04:29 2005
@@ -282,9 +282,8 @@
         return None
     else:
         # ImportError
-        w_failing = w_modulename
-        w_exc = space.call_function(space.w_ImportError, w_failing)
-        raise OperationError(space.w_ImportError, w_exc)
+	msg = "No module named %s" % modulename
+        raise OperationError(space.w_ImportError, w(msg))
 
 # __________________________________________________________________
 #



More information about the Pypy-commit mailing list