From f0b06798f01a1c1e30477ea93d24db0f9459048a Mon Sep 17 00:00:00 2001 From: Nikita Nemkin Date: Tue, 21 May 2013 00:56:12 +0600 Subject: [PATCH] Do not abort .pxd processing due to previous unrelated errors. --- Cython/Compiler/Main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cython/Compiler/Main.py b/Cython/Compiler/Main.py index 44d89ca..41019a8 100644 --- a/Cython/Compiler/Main.py +++ b/Cython/Compiler/Main.py @@ -290,6 +290,7 @@ class Context(object): source_filename = source_desc.filename scope.cpp = self.cpp # Parse the given source file and return a parse tree. + num_errors = Errors.num_errors try: f = Utils.open_source_file(source_filename, "rU") try: @@ -321,7 +322,7 @@ class Context(object): "Decoding error, missing or incorrect coding= " "at top of source (cannot decode with encoding %r: %s)" % (encoding, msg)) - if Errors.num_errors > 0: + if Errors.num_errors > num_errors: raise CompileError() return tree -- 2.7.4