[yum-commits] Branch 'yum-3_2_X' - yum/packages.py

James Antill james at osuosl.org
Tue Jul 7 05:22:25 UTC 2009


 yum/packages.py |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 1f45838e29ba26dac22215dd9c918fb920569fef
Author: James Antill <james at and.org>
Date:   Mon Jul 6 14:11:58 2009 -0400

    Fix speed regression in costExcludes (super magic)

diff --git a/yum/packages.py b/yum/packages.py
index d4838ee..a124d7b 100644
--- a/yum/packages.py
+++ b/yum/packages.py
@@ -237,6 +237,11 @@ class PackageObject(object):
                                       self.arch)
         return out
 
+    def __unicode__(self):
+        """ This is here because unicode(pkg) is roughly 50x slower than
+            str(pkg), and "%s" % (pkg,) uses unicode(). """
+        return misc.to_unicode(self.__str__())
+
     def verCMP(self, other):
         """ Compare package to another one, only rpm-version ordering. """
         if not other:


More information about the Yum-commits mailing list