comparison 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
comparison
equal deleted inserted replaced
251:243f206574cb 252:2e0b373414b8
63 return 63 return
64 64
65 revisions = sorted(revisions, key=lambda r: r.status.start, reverse=True) 65 revisions = sorted(revisions, key=lambda r: r.status.start, reverse=True)
66 66
67 if main_rev is None: 67 if main_rev is None:
68 revpkg = revisions[0] 68 filtered = [revpkg for revpkg in revisions
69 if revpkg.status.status.finished
70 and not revpkg.status.status.error]
71 if filtered:
72 revpkg = filtered[0]
73 else:
74 revpkg = None
69 else: 75 else:
70 # iterate in reverse, so that we pick up the newest revision 76 # iterate in reverse, so that we pick up the newest revision
71 # packager with the desired revision first if rules_rev is None 77 # packager with the desired revision first if rules_rev is None
72 for revpkg in revisions: 78 for revpkg in revisions:
73 if revpkg.revision == main_rev: 79 if revpkg.revision == main_rev:
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)