[yum-git] yum/packages.py yum/sqlitesack.py

Tim Lauridsen timlau at linux.duke.edu
Mon Feb 4 10:00:12 UTC 2008


 yum/packages.py   |    2 +-
 yum/sqlitesack.py |    4 ----
 2 files changed, 1 insertion(+), 5 deletions(-)

New commits:
commit 2aa45124ccb3b471246abd89dd0a8b399e145f3a
Author: Tim Lauridsen <tla at rasmil.dk>
Date:   Mon Feb 4 10:54:53 2008 +0100

    added memory address to package object __repr__, so we can see if a object is unigue, removed the __repr__ for YumAvailablePackageSqlite and use the default one

diff --git a/yum/packages.py b/yum/packages.py
index a5c1bbf..b5ed5fa 100644
--- a/yum/packages.py
+++ b/yum/packages.py
@@ -192,7 +192,7 @@ class PackageObject(object):
         return ret
 
     def __repr__(self):
-        return "<%s : %s>" % (self.__class__.__name__, str(self)) 
+        return "<%s : %s (%s)>" % (self.__class__.__name__, str(self),hex(id(self))) 
 
     def returnSimple(self, varname):
         warnings.warn("returnSimple() will go away in a future version of Yum.\n",
diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
index 1e737b6..dcca06e 100644
--- a/yum/sqlitesack.py
+++ b/yum/sqlitesack.py
@@ -69,10 +69,6 @@ class YumAvailablePackageSqlite(YumAvailablePackage, PackageObject, RpmBase):
 
     files = property(fget=lambda self: self._loadFiles())
 
-    def __repr__(self):
-        h = hex(hash(self.pkgid + self.repo.id + str(self)))
-        return "<%s : %s (%s) %s>" % (self.__class__.__name__,str(self),self.repo.id,h)
-        
     def _read_db_obj(self, db_obj, item=None):
         """read the db obj. If asked for a specific item, return it.
            otherwise populate out into the object what exists"""



More information about the Yum-cvs-commits mailing list