From: Stefan Behnel Date: Sun, 10 Aug 2008 07:44:54 +0000 (+0200) Subject: compiler error fix X-Git-Tag: 0.9.8.1~73 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e12eddfee7431cea28dc2a3cc38bec7a6b62b0d6;p=cython.git compiler error fix --- diff --git a/Cython/Compiler/Main.py b/Cython/Compiler/Main.py index 6bda38d5..55b031e1 100644 --- a/Cython/Compiler/Main.py +++ b/Cython/Compiler/Main.py @@ -70,7 +70,9 @@ class Context: scope = None pxd_pathname = None if not module_name_pattern.match(module_name): - raise CompileError((path, 0, 0), + if pos is None: + pos = (module_name, 0, 0) + raise CompileError(pos, "'%s' is not a valid module name" % module_name) if "." not in module_name and relative_to: if debug_find_module: