Merge lp:~brian-murray/ubuntu-archive-tools/task-link-index-error into lp:ubuntu-archive-tools

Proposed by Brian Murray
Status: Merged
Merged at revision: 1196
Proposed branch: lp:~brian-murray/ubuntu-archive-tools/task-link-index-error
Merge into: lp:ubuntu-archive-tools
Diff against target: 12 lines (+2/-0)
1 file modified
sru-report (+2/-0)
To merge this branch: bzr merge lp:~brian-murray/ubuntu-archive-tools/task-link-index-error
Reviewer Review Type Date Requested Status
Steve Langasek Approve
Review via email: mp+360961@code.launchpad.net

Description of the change

Fix this:

Traceback (most recent call last):
  File "/home/ubuntu-archive/ubuntu-archive-tools/sru-report", line 718, in <module> main()
  File "/home/ubuntu-archive/ubuntu-archive-tools/sru-report", line 714, in main
    print_report(srus) File "/home/ubuntu-archive/ubuntu-archive-tools/sru-report", line 343, in print_report
    if pkg == task.self_link.split('/')[7] \ IndexError: list index out of range

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) wrote :

Seen with https://launchpad.net/ubuntu/+source/neutron-fwaas-dashboard/1.3.0-0ubuntu1 which has https://api.launchpad.net/devel/ubuntu/+bug/1808168 as a link due to the task on this bug that has no associated package.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sru-report'
2--- sru-report 2018-11-22 09:48:02 +0000
3+++ sru-report 2018-12-14 21:57:59 +0000
4@@ -340,6 +340,8 @@
5 for task in bug.bug_tasks:
6 if task.self_link.split('/')[4] != 'ubuntu':
7 continue
8+ if len(task.self_link.split('/')) != 8:
9+ continue
10 if pkg == task.self_link.split('/')[7] \
11 and release == task.self_link.split('/')[5]:
12 if task.status == 'Incomplete':

Subscribers

People subscribed via source and target branches