From: Stefan Behnel Date: Fri, 21 Aug 2009 07:42:01 +0000 (+0200) Subject: Py3 fix X-Git-Tag: 0.12.alpha0~245 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1a38e0ce9e127c20bad78b172a5b28a27f67d81a;p=cython.git Py3 fix --- diff --git a/Cython/Compiler/Main.py b/Cython/Compiler/Main.py index f8bcf151..a5b1efe3 100644 --- a/Cython/Compiler/Main.py +++ b/Cython/Compiler/Main.py @@ -192,7 +192,7 @@ class Context(object): return Errors.report_error(exc) def run_pipeline(self, pipeline, source): - err = None + error = None data = source try: for phase in pipeline: @@ -203,11 +203,13 @@ class Context(object): except CompileError, err: # err is set Errors.report_error(err) + error = err except InternalError, err: # Only raise if there was not an earlier error if Errors.num_errors == 0: raise - return (err, data) + error = err + return (error, data) def find_module(self, module_name, relative_to = None, pos = None, need_pxd = 1):