Merge lp:~brian-murray/ubuntu-archive-tools/objects-traceback into lp:ubuntu-archive-tools

Proposed by Brian Murray
Status: Merged
Merged at revision: 1060
Proposed branch: lp:~brian-murray/ubuntu-archive-tools/objects-traceback
Merge into: lp:ubuntu-archive-tools
Diff against target: 15 lines (+5/-0)
1 file modified
phased-updater (+5/-0)
To merge this branch: bzr merge lp:~brian-murray/ubuntu-archive-tools/objects-traceback
Reviewer Review Type Date Requested Status
Ubuntu Package Archive Administrators Pending
Review via email: mp+309707@code.launchpad.net

Description of the change

Fix this:

Traceback (most recent call last):
  File "/home/ubuntu-archive/ubuntu-archive-tools/phased-updater", line 700, in <module>
    main()
  File "/home/ubuntu-archive/ubuntu-archive-tools/phased-updater", line 608, in main
    problems = new_buckets(archive, release, src_pkg, version)
  File "/home/ubuntu-archive/ubuntu-archive-tools/phased-updater", line 438, in new_buckets
    if len([vd[release.name] for vd in versions_data['objects'] \
KeyError: 'objects'

Which happens when errors encouters a timeout querying the db.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'phased-updater'
2--- phased-updater 2016-10-17 14:39:27 +0000
3+++ phased-updater 2016-10-31 19:21:45 +0000
4@@ -434,6 +434,11 @@
5 # in this case
6 buckets.append(bucket['web_link'])
7 continue
8+ if 'error_message' in versions_data:
9+ # don't return an error because its better to have a false positive
10+ # in this case
11+ buckets.append(bucket['web_link'])
12+ continue
13 # -1 means that release isn't affected
14 if len([vd[release.name] for vd in versions_data['objects'] \
15 if vd['version'] == new_version and vd[release.name] != -1]) == 0:

Subscribers

People subscribed via source and target branches