compiler error fix
authorStefan Behnel <scoder@users.berlios.de>
Sun, 10 Aug 2008 07:44:54 +0000 (09:44 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Sun, 10 Aug 2008 07:44:54 +0000 (09:44 +0200)
Cython/Compiler/Main.py

index 6bda38d5dbbd940b242d2c5cafcdf917b3a0398b..55b031e1025fcbe318f08cc6894a5a90a4d71117 100644 (file)
@@ -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: