Merge lp:~brian-murray/ubuntu-archive-tools/sru-report-key-error into lp:ubuntu-archive-tools

Proposed by Brian Murray
Status: Merged
Merged at revision: 1455
Proposed branch: lp:~brian-murray/ubuntu-archive-tools/sru-report-key-error
Merge into: lp:ubuntu-archive-tools
Diff against target: 19 lines (+1/-1)
1 file modified
sru-report (+1/-1)
To merge this branch: bzr merge lp:~brian-murray/ubuntu-archive-tools/sru-report-key-error
Reviewer Review Type Date Requested Status
Łukasz Zemczak Pending
Ubuntu Package Archive Administrators Pending
Review via email: mp+399042@code.launchpad.net

Description of the change

Define autopkg_fails earlier to avoid this KeyError:

Traceback (most recent call last):
  File "/home/ubuntu-archive/ubuntu-archive-tools/sru-report", line 796, in <module> main()
  File "/home/ubuntu-archive/ubuntu-archive-tools/sru-report", line 792, in main print_report(srus)
  File "/home/ubuntu-archive/ubuntu-archive-tools/sru-report", line 343, in print_report for excuse in rpkg['autopkg_fails']:
KeyError: 'autopkg_fails'

To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) wrote :

I realized I have the ability to cowboy this change on snakefruit so I did.

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 2021-02-23 06:38:26 +0000
3+++ sru-report 2021-03-03 00:18:51 +0000
4@@ -712,6 +712,7 @@
5 srus[release][pkg] = current_versions(releases[release], pkg)
6 srus[release][pkg]['bugs'] = match_srubugs(
7 srus[release][pkg]['changesfiles'])
8+ srus[release][pkg]['autopkg_fails'] = []
9
10 srus[release][pkg]['build_problems'] = {}
11 try:
12@@ -725,7 +726,6 @@
13 else:
14 raise e
15
16- srus[release][pkg]['autopkg_fails'] = []
17 if pkg in pkg_excuses:
18 for excuse in excuses_data['sources']:
19 if excuse['source'] == pkg:

Subscribers

People subscribed via source and target branches