Fix code from previous commit to handle missing BUILD_TIME better.
authorZac Medico <zmedico@gentoo.org>
Fri, 4 Jun 2010 17:27:46 +0000 (10:27 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 4 Jun 2010 17:27:46 +0000 (10:27 -0700)
pym/portage/dbapi/bintree.py

index d5e2feaf75e8b60695f76ada1e2e8469a4b80c36..680a6395a81defde12f42107012746ce249c02f9 100644 (file)
@@ -791,16 +791,16 @@ class binarytree(object):
                                                btime = int(btime)
                                        except ValueError:
                                                btime = None
-                                       if btime:
-                                               other_d = remotepkgs.get(cpv)
-                                               if other_d is not None:
-                                                       other_btime = other_d.get('BUILD_TIME', '')
-                                                       try:
-                                                               other_btime = int(other_btime)
-                                                       except ValueError:
-                                                               other_btime = None
-                                                       if other_btime and other_btime > btime:
-                                                               continue
+
+                                       other_d = remotepkgs.get(cpv)
+                                       if other_d is not None:
+                                               other_btime = other_d.get('BUILD_TIME', '')
+                                               try:
+                                                       other_btime = int(other_btime)
+                                               except ValueError:
+                                                       other_btime = None
+                                               if other_btime and (not btime or other_btime > btime):
+                                                       continue
 
                                        remotepkgs[cpv] = d