From 742c950219ac8796e324b8d3d31235e69661dbad Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 4 Jun 2010 10:27:46 -0700 Subject: Fix code from previous commit to handle missing BUILD_TIME better. --- pym/portage/dbapi/bintree.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'pym') diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index d5e2feaf7..680a6395a 100644 --- a/pym/portage/dbapi/bintree.py +++ b/pym/portage/dbapi/bintree.py @@ -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 -- cgit v1.2.3-1-g7c22