There's now a 4th state for getDifferencesTo, let's explicitly query both the ones we are interested in, rather than an inverted search on the 3rd state.

This commit is contained in:
Stefano Rivera 2011-09-04 01:49:24 +02:00
parent a3378ee9fc
commit 54cb83cd4d

View File

@ -410,9 +410,11 @@ def is_blacklisted(query):
# LP: # LP:
# TODO: Refactor when LP: #833080 is fixed # TODO: Refactor when LP: #833080 is fixed
series = Launchpad.distributions['ubuntu'].current_series series = Launchpad.distributions['ubuntu'].current_series
diffs = series.getDifferencesTo(source_package_name_filter=query, diffs = (list(series.getDifferencesTo(source_package_name_filter=query,
status='Needs attention') status='Blacklisted current version'))
if len(diffs) == 0: + list(series.getDifferencesTo(source_package_name_filter=query,
status='Blacklisted always')))
if len(diffs) > 0:
comments = series.getDifferenceComments(source_package_name=query) comments = series.getDifferenceComments(source_package_name=query)
comment = '; '.join(c.body_text for c in comments) comment = '; '.join(c.body_text for c in comments)
if comment: if comment: