Author: Ronan Lamy <[email protected]>
Branch: multiphase
Changeset: r92144:8c278da05b4c
Date: 2017-08-14 16:39 +0200
http://bitbucket.org/pypy/pypy/changeset/8c278da05b4c/

Log:    fix crash when non-ascii extension cannot be found

diff --git a/pypy/module/cpyext/api.py b/pypy/module/cpyext/api.py
--- a/pypy/module/cpyext/api.py
+++ b/pypy/module/cpyext/api.py
@@ -1523,7 +1523,7 @@
         else:
             look_for = also_look_for
     msg = u"function %s not found in library %s" % (
-        unicode(look_for), space.unicode_w(space.newfilename(path)))
+        look_for.decode('utf-8'), space.unicode_w(space.newfilename(path)))
     w_path = space.newfilename(path)
     raise_import_error(space, space.newunicode(msg), w_name, w_path)
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to