Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r59017:21f2905ba172
Date: 2012-11-20 08:11 +0100
http://bitbucket.org/pypy/pypy/changeset/21f2905ba172/

Log:    If it's decoded, it was certainly a bytes string.

diff --git a/pypy/module/_ssl/interp_ssl.py b/pypy/module/_ssl/interp_ssl.py
--- a/pypy/module/_ssl/interp_ssl.py
+++ b/pypy/module/_ssl/interp_ssl.py
@@ -818,7 +818,7 @@
         length = libssl_ASN1_STRING_to_UTF8(buf_ptr, value)
         if length < 0:
             raise _ssl_seterror(space, None, 0)
-        w_value = space.wrap(rffi.charpsize2str(buf_ptr[0], length))
+        w_value = space.wrapbytes(rffi.charpsize2str(buf_ptr[0], length))
         w_value = space.call_method(w_value, "decode", space.wrap("utf-8"))
 
     return space.newtuple([w_name, w_value])
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to