[yum-git] yum/transactioninfo.py

Florian Festi ffesti at linux.duke.edu
Thu Feb 14 17:38:45 UTC 2008


 yum/transactioninfo.py |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 7d41bbd29213f37d952e97ad16f45285d9f6cd37
Author: Florian Festi <ffesti at redhat.com>
Date:   Thu Feb 14 18:38:08 2008 +0100

    Use id() instead of hash() as it is granted to be unique

diff --git a/yum/transactioninfo.py b/yum/transactioninfo.py
index 58a5e5e..9d10162 100644
--- a/yum/transactioninfo.py
+++ b/yum/transactioninfo.py
@@ -551,12 +551,8 @@ class TransactionMember:
 
     def __cmp__(self, other):
         result = cmp(self.name, other.name)
-        if result == 0:
-            result = cmp(hash(self), hash(other))
-            if self is other:
-                return 0
-            if result == 0:
-                return 1
+        if not result:
+            return cmp(id(self), id(other))
         return result
 
     def __hash__(self):



More information about the Yum-cvs-commits mailing list