From: Stefan Behnel Date: Fri, 21 Aug 2009 07:55:43 +0000 (+0200) Subject: Py3 fix X-Git-Tag: 0.12.alpha0~243 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ae51384fa6905a6cb4280feabbd2a15b3c437ffc;p=cython.git Py3 fix --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index c291431c..407cd83f 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -5257,7 +5257,8 @@ class NoneCheckNode(CoercionNode): "if (unlikely(%s == Py_None)) {" % self.arg.result()) code.putln('PyErr_SetString(%s, "%s"); %s ' % ( self.exception_type_cname, - StringEncoding.escape_byte_string(self.exception_message), + StringEncoding.escape_byte_string( + self.exception_message.encode('UTF-8')), code.error_goto(self.pos))) code.putln("}")