mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-07 23:11:29 +00:00
LP: #833080 is fixed, refactoring blacklisting
This commit is contained in:
parent
b314aa599c
commit
b35a2611af
12
syncpackage
12
syncpackage
@ -407,21 +407,15 @@ def is_blacklisted(query):
|
|||||||
Returns tuple of (blacklisted, comments)
|
Returns tuple of (blacklisted, comments)
|
||||||
blacklisted is one of False, 'CURRENT', 'ALWAYS'
|
blacklisted is one of False, 'CURRENT', 'ALWAYS'
|
||||||
"""
|
"""
|
||||||
# LP:
|
|
||||||
# TODO: Refactor when LP: #833080 is fixed
|
|
||||||
series = Launchpad.distributions['ubuntu'].current_series
|
series = Launchpad.distributions['ubuntu'].current_series
|
||||||
lp_comments = series.getDifferenceComments(source_package_name=query)
|
lp_comments = series.getDifferenceComments(source_package_name=query)
|
||||||
blacklisted = False
|
blacklisted = False
|
||||||
comments = u'; '.join(c.body_text for c in lp_comments)
|
comments = u'; '.join(c.body_text for c in lp_comments)
|
||||||
|
|
||||||
diffs = series.getDifferencesTo(source_package_name_filter=query,
|
diff = series.getDifferencesTo(source_package_name_filter=query)[0]
|
||||||
status='Blacklisted current version')
|
if diff.status == 'Blacklisted current version':
|
||||||
if len(diffs) > 0:
|
|
||||||
blacklisted = 'CURRENT'
|
blacklisted = 'CURRENT'
|
||||||
|
if diff.status == 'Blacklisted always':
|
||||||
diffs = series.getDifferencesTo(source_package_name_filter=query,
|
|
||||||
status='Blacklisted always')
|
|
||||||
if len(diffs) > 0:
|
|
||||||
blacklisted = 'ALWAYS'
|
blacklisted = 'ALWAYS'
|
||||||
|
|
||||||
# Old blacklist:
|
# Old blacklist:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user