From 4b1ae97122a8f8bb69925a53a0de9b807664ec3a Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Wed, 8 Sep 2010 20:05:24 +0200 Subject: [PATCH] cleanup --- Cython/Compiler/Errors.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Cython/Compiler/Errors.py b/Cython/Compiler/Errors.py index bf99017c..76b67046 100644 --- a/Cython/Compiler/Errors.py +++ b/Cython/Compiler/Errors.py @@ -40,15 +40,8 @@ class CompileError(PyrexError): pos_str = u"%s:%d:%d: " % (position[0].get_description(), position[1], position[2]) cont = context(position) - else: - pos_str = u"" - cont = u'' - if position is None: - Exception.__init__(self, message) - else: - Exception.__init__( - self, u'\nError converting Pyrex file to C:\n%s\n%s%s' % ( - cont, pos_str, message)) + message = u'\nError converting Pyrex file to C:\n%s\n%s%s' % (cont, pos_str, message) + Exception.__init__(self, message) class CompileWarning(PyrexWarning): -- 2.26.2