[pypy-commit] pypy py3k: Fix translation
rlamy
pypy.commits at gmail.com
Sat Sep 24 19:42:30 EDT 2016
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py3k
Changeset: r87369:51fce56a2bf1
Date: 2016-09-25 00:41 +0100
http://bitbucket.org/pypy/pypy/changeset/51fce56a2bf1/
Log: Fix translation
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
@@ -1556,11 +1556,11 @@
look_for += ' or ' + also_look_for
else:
look_for = also_look_for
- w_msg = u"function %s not found in library %s" % (
+ msg = u"function %s not found in library %s" % (
unicode(look_for), space.unicode_w(space.wrap_fsdecoded(path)))
w_name = space.newunicode(name.decode('ascii'))
w_path = space.wrap_fsdecoded(path)
- raise_import_error(space, w_msg, w_name, w_path)
+ raise_import_error(space, space.newunicode(msg), w_name, w_path)
initfunctype = lltype.Ptr(lltype.FuncType([], PyObject))
diff --git a/pypy/module/imp/interp_imp.py b/pypy/module/imp/interp_imp.py
--- a/pypy/module/imp/interp_imp.py
+++ b/pypy/module/imp/interp_imp.py
@@ -58,7 +58,7 @@
from pypy.module.cpyext.api import load_extension_module
# extension names must be valid C identifiers
modulename = modulename.encode('ascii')
- load_extension_module(space, filename, modulename.encode('ascii'))
+ load_extension_module(space, filename, modulename)
return importing.check_sys_modules_w(space, modulename)
More information about the pypy-commit
mailing list