Fix size comparison logic.
authorZac Medico <zmedico@gentoo.org>
Tue, 22 May 2007 11:22:36 +0000 (11:22 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 22 May 2007 11:22:36 +0000 (11:22 -0000)
svn path=/main/trunk/; revision=6570

pym/portage/dbapi/bintree.py

index d15f00b8b40a52e5289e07e8edf2a5086c7c6c35..9d9b8400500bccbda2f9eefaee7b9d7589e5acde 100644 (file)
@@ -476,9 +476,9 @@ class binarytree(object):
                                                                d.clear()
                                        if d:
                                                try:
-                                                       if long(d.get("SIZE")) != long(s.st_size):
+                                                       if long(d["SIZE"]) != long(s.st_size):
                                                                d.clear()
-                                               except ValueError:
+                                               except (KeyError, ValueError):
                                                        d.clear()
 
                                        d["CPV"] = mycpv