From 00aa8876d61f2b6585f60b93f1fa3ee6b4a5b861 Mon Sep 17 00:00:00 2001 From: arigo Date: Mon, 12 Feb 2007 17:49:32 +0100 Subject: [PATCH] [svn r38597] 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. --HG-- branch : trunk --- py/misc/buildcmodule.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/misc/buildcmodule.py b/py/misc/buildcmodule.py index a08e49e77..5215e091b 100644 --- a/py/misc/buildcmodule.py +++ b/py/misc/buildcmodule.py @@ -28,7 +28,7 @@ def make_module_from_c(cfile): 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!