summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-03-27 14:44:57 -0700
committerZac Medico <zmedico@gentoo.org>2010-03-27 14:44:57 -0700
commitff00dac71e9d1810f0d95d096132f76a2872df65 (patch)
treed1193aa1f4aaf9c107c0e62b12b954086e36ff7a
parent4f8e75b71f149b1aa0411051fe06a836f6f07cd3 (diff)
downloadportage-ff00dac71e9d1810f0d95d096132f76a2872df65.tar.gz
portage-ff00dac71e9d1810f0d95d096132f76a2872df65.tar.bz2
portage-ff00dac71e9d1810f0d95d096132f76a2872df65.zip
Implement __unicode__ for python2.
-rw-r--r--pym/portage/proxy/objectproxy.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pym/portage/proxy/objectproxy.py b/pym/portage/proxy/objectproxy.py
index 9bcd6b43a..92b36d111 100644
--- a/pym/portage/proxy/objectproxy.py
+++ b/pym/portage/proxy/objectproxy.py
@@ -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')())