Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r57997:4c065fffe139
Date: 2012-10-10 21:57 +0200
http://bitbucket.org/pypy/pypy/changeset/4c065fffe139/

Log:    Fix getattr unit tests.

diff --git a/pypy/module/__builtin__/operation.py 
b/pypy/module/__builtin__/operation.py
--- a/pypy/module/__builtin__/operation.py
+++ b/pypy/module/__builtin__/operation.py
@@ -50,8 +50,8 @@
     # Note that if w_name is already a string (or a subclass of str),
     # it must be returned unmodified (and not e.g. unwrapped-rewrapped).
     if not space.is_w(space.type(w_name), space.w_text):
-        name = space.str_w(w_name)    # typecheck
-        w_name = space.wrap(name)     # rewrap as a real string
+        name = space.unicode_w(w_name)  # typecheck
+        w_name = space.wrap(name)  # rewrap as a real string
     return w_name
 
 def delattr(space, w_object, w_name):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to