From: Vitja Makarov Date: Wed, 13 Apr 2011 15:01:33 +0000 (+0400) Subject: Don't report error if position is not set X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=2b0c34610c04c55cb169b5d27afaf22d3e3940b0;p=cython.git Don't report error if position is not set --- diff --git a/Cython/Compiler/Errors.py b/Cython/Compiler/Errors.py index c50f0230..025d1a6e 100644 --- a/Cython/Compiler/Errors.py +++ b/Cython/Compiler/Errors.py @@ -176,7 +176,7 @@ def message(position, message, level=1): def warning(position, message, level=0): if level < LEVEL: return - if Options.warning_errors: + if Options.warning_errors and position: return error(position, message) warn = CompileWarning(position, message) line = "warning: %s\n" % warn