mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
Try to find a Ubuntu bug task on the bug, rather than assuming the first one is the one we want. If we fail, revert back to previous behavior. Logic for finding task could be better. hohum.
This commit is contained in:
parent
24a1820266
commit
1787c499ff
17
ack-sync
17
ack-sync
@ -186,12 +186,23 @@ def ack_sync(bug_numbers, all_package, all_version, all_section, update,
|
||||
print "Taking email address from local file: " + \
|
||||
uploader_email
|
||||
|
||||
task = list(bug.bug_tasks)[0]
|
||||
|
||||
# Try to find a Ubuntu bug task, against which the package is raised.
|
||||
for t in bug.bug_tasks:
|
||||
if t.bug_target_name.endswith(' (Ubuntu)'):
|
||||
task = t
|
||||
break
|
||||
try:
|
||||
print "Using Ubuntu bug task: %s" % task.bug_target_name
|
||||
except NameError:
|
||||
# We failed, use the first task (revert to previous behavior)
|
||||
task = bug.bug_tasks[0]
|
||||
print ("W: Could not find bug task for a Ubuntu package."
|
||||
" Using task '%s'" % task.bug_target_name)
|
||||
|
||||
if all_package is not None:
|
||||
package = all_package
|
||||
else:
|
||||
package = task.bug_target_name.split(" ")[0]
|
||||
package = task.bug_target_name.split(" ")
|
||||
if package == "ubuntu":
|
||||
words = bug.title.split(" ")
|
||||
# no source package was defined. Guessing that the second or
|
||||
|
Loading…
x
Reference in New Issue
Block a user