Handle a KeyError if an MTIME is missing from the Packages index.
authorZac Medico <zmedico@gentoo.org>
Tue, 22 May 2007 12:26:12 +0000 (12:26 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 22 May 2007 12:26:12 +0000 (12:26 -0000)
svn path=/main/trunk/; revision=6571

pym/portage/dbapi/bintree.py

index 9d9b8400500bccbda2f9eefaee7b9d7589e5acde..030f03163bd77a436ac679cb7f0ca610d7ff9734 100644 (file)
@@ -412,9 +412,9 @@ class binarytree(object):
                                                skip = False
                                                if d:
                                                        try:
-                                                               if long(d.get("MTIME")) == long(s.st_mtime):
+                                                               if long(d["MTIME"]) == long(s.st_mtime):
                                                                        skip = True
-                                                       except ValueError:
+                                                       except (KeyError, ValueError):
                                                                pass
                                                if skip and not self._pkgindex_keys.difference(d):
                                                        pkg_paths[mycpv] = mypath