From 1a38e0ce9e127c20bad78b172a5b28a27f67d81a Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Fri, 21 Aug 2009 09:42:01 +0200 Subject: [PATCH] Py3 fix --- Cython/Compiler/Main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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): -- 2.26.2