Implement __unicode__ for python2.
authorZac Medico <zmedico@gentoo.org>
Sat, 27 Mar 2010 21:44:57 +0000 (14:44 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 27 Mar 2010 21:44:57 +0000 (14:44 -0700)
pym/portage/proxy/objectproxy.py

index 9bcd6b43a03dddc89c6013f05fdf04ac7881f73d..92b36d111be5e6f0af9631a9bc39c33aeb605893 100644 (file)
@@ -84,5 +84,8 @@ class ObjectProxy(object):
        if sys.hexversion < 0x3000000:
                __nonzero__ = __bool__
 
+               def __unicode__(self):
+                       return unicode(object.__getattribute__(self, '_get_target')())
+
        def __int__(self):
                return int(object.__getattribute__(self, '_get_target')())