diff bin/listpackages.py @ 252:2e0b373414b8

Make bin/listpackages.py ignore revisions that have not been built successfully, unless the revision has been explicitly selected. Add a test case for this.
author Bernhard Herzog <bh@intevation.de>
date Tue, 14 Apr 2009 09:41:59 +0000
parents 243f206574cb
children 7d932fac1055
line wrap: on
line diff
--- a/bin/listpackages.py	Thu Apr 09 18:59:44 2009 +0000
+++ b/bin/listpackages.py	Tue Apr 14 09:41:59 2009 +0000
@@ -65,7 +65,13 @@
     revisions = sorted(revisions, key=lambda r: r.status.start, reverse=True)
 
     if main_rev is None:
-        revpkg = revisions[0]
+        filtered = [revpkg for revpkg in revisions
+                    if revpkg.status.status.finished
+                       and not revpkg.status.status.error]
+        if filtered:
+            revpkg = filtered[0]
+        else:
+            revpkg = None
     else:
         # iterate in reverse, so that we pick up the newest revision
         # packager with the desired revision first if rules_rev is None
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)