From: Stefan Behnel Date: Wed, 12 May 2010 20:20:21 +0000 (+0200) Subject: error handling in __test__ dict creation code X-Git-Tag: 0.13.beta0~85 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b1a0e894aa10a343877beef870b33a0218003b5b;p=cython.git error handling in __test__ dict creation code --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 6cb86bc2..42c06fb5 100755 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -6512,8 +6512,9 @@ class DocstringRefNode(ExprNode): pass def generate_result_code(self, code): - code.putln('%s = __Pyx_GetAttrString(%s, "__doc__");' % - (self.result(), self.body.result())) + code.putln('%s = __Pyx_GetAttrString(%s, "__doc__"); %s' % ( + self.result(), self.body.result(), + code.error_goto_if_null(self.result(), self.pos))) code.put_gotref(self.result())