From: Zac Medico Date: Sat, 27 Mar 2010 21:44:57 +0000 (-0700) Subject: Implement __unicode__ for python2. X-Git-Tag: v2.2_rc68~686 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ff00dac71e9d1810f0d95d096132f76a2872df65;p=portage.git Implement __unicode__ for python2. --- 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')())