[Treepkg-commits] r392 - branches/treepkg-status/treepkg/info
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jul 29 16:50:53 CEST 2010
Author: bricks
Date: 2010-07-29 16:50:53 +0200 (Thu, 29 Jul 2010)
New Revision: 392
Modified:
branches/treepkg-status/treepkg/info/status.py
Log:
fix handling of showing only successfull builds together with num packages
Modified: branches/treepkg-status/treepkg/info/status.py
===================================================================
--- branches/treepkg-status/treepkg/info/status.py 2010-07-29 13:43:39 UTC (rev 391)
+++ branches/treepkg-status/treepkg/info/status.py 2010-07-29 14:50:53 UTC (rev 392)
@@ -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
More information about the Treepkg-commits
mailing list