From 2b0c34610c04c55cb169b5d27afaf22d3e3940b0 Mon Sep 17 00:00:00 2001 From: Vitja Makarov Date: Wed, 13 Apr 2011 19:01:33 +0400 Subject: [PATCH] Don't report error if position is not set --- Cython/Compiler/Errors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.26.2