[py-svn] r38597 - py/trunk/py/misc

arigo at codespeak.net arigo at codespeak.net
Mon Feb 12 17:49:32 CET 2007


Author: arigo
Date: Mon Feb 12 17:49:32 2007
New Revision: 38597

Modified:
   py/trunk/py/misc/buildcmodule.py
Log:
Raise an ImportError if there is no way to build a C extension module,
e.g. on top of pypy-c.  Importing e.g. py.magic.greenlet then gives an
exception that is saner to catch than ValueError.


Modified: py/trunk/py/misc/buildcmodule.py
==============================================================================
--- py/trunk/py/misc/buildcmodule.py	(original)
+++ py/trunk/py/misc/buildcmodule.py	Mon Feb 12 17:49:32 2007
@@ -28,7 +28,7 @@
         if filetype == imp.C_EXTENSION:
             break
     else:
-        raise ValueError, "cannot find the file name suffix of C ext modules"
+        raise ImportError, "cannot find the file name suffix of C ext modules"
     lib = dirpath.join(modname+ext)
 
     # argl! we need better "build"-locations alltogether!


More information about the py-svn mailing list