In Task.__str__(), emulate tuple.__str__, but don't show 'foo' as u'foo' for
authorZac Medico <zmedico@gentoo.org>
Sat, 8 Aug 2009 21:18:15 +0000 (21:18 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 8 Aug 2009 21:18:15 +0000 (21:18 -0000)
unicode strings.

svn path=/main/trunk/; revision=13950

pym/_emerge/Task.py

index dbbdcd24fcd17fbe866935ecc0a3bd492e628780..d218ba360d3b682ccb99e717d35b0544e7f295cc 100644 (file)
@@ -37,5 +37,8 @@ class Task(SlotObject):
                return key in self._get_hash_key()
 
        def __str__(self):
-               return str(self._get_hash_key())
-
+               """
+               Emulate tuple.__repr__, but don't show 'foo' as u'foo' for unicode
+               strings.
+               """
+               return "(%s)" % ", ".join(("'%s'" % x for x in self._get_hash_key()))