From e12eddfee7431cea28dc2a3cc38bec7a6b62b0d6 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 10 Aug 2008 09:44:54 +0200 Subject: [PATCH] compiler error fix --- Cython/Compiler/Main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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: -- 2.26.2