# HG changeset patch # User Bjoern Ricks # Date 1280415053 0 # Node ID acf97c1a06e0896d80ff6e8e24c945d7e989b406 # Parent 0953704dc49eaf14af9e219fbbea9696eb14555d fix handling of showing only successfull builds together with num packages diff -r 0953704dc49e -r acf97c1a06e0 treepkg/info/status.py --- a/treepkg/info/status.py Thu Jul 29 13:43:39 2010 +0000 +++ b/treepkg/info/status.py Thu Jul 29 14:50:53 2010 +0000 @@ -91,16 +91,18 @@ revisions = track.get_revisions() revisions = sorted(revisions, key=lambda r: r.status.start, reverse=True) + canidates = revsisions + if self.success: # skip not successful builds + candidates = [rev for rev in revisions + if rev.status.status.finished + and not rev.status.status.error] + if self.numnewestrev > 0: - revisions = revisions[:self.numnewestrev] + canditates = candidates[:self.numnewestrev] arch = None - for rev in revisions: - if self.success: # skip not successful builds - if not rev.status.status.finished \ - or rev.status.status.error: - continue + for rev in candidates: revision = rev.revision rules_revision = rev.rules_revision status = rev.status.status.description # extend status