Merge lp:~brian-murray/ubuntu-archive-tools/no-signer into lp:ubuntu-archive-tools

Proposed by Brian Murray
Status: Merged
Merged at revision: 1091
Proposed branch: lp:~brian-murray/ubuntu-archive-tools/no-signer
Merge into: lp:ubuntu-archive-tools
Diff against target: 30 lines (+11/-3)
1 file modified
sru-report (+11/-3)
To merge this branch: bzr merge lp:~brian-murray/ubuntu-archive-tools/no-signer
Reviewer Review Type Date Requested Status
Ubuntu Package Archive Administrators Pending
Review via email: mp+322561@code.launchpad.net

Description of the change

This crash is happening with zesty because of some of the packages in -proposed since AA isn't open.

Traceback (most recent call last):
  File "/home/ubuntu-archive/ubuntu-archive-tools/sru-report", line 791, in <module>
    main()
  File "/home/ubuntu-archive/ubuntu-archive-tools/sru-report", line 787, in main
    print_report(srus, kernel_ppa)
  File "/home/ubuntu-archive/ubuntu-archive-tools/sru-report", line 309, in print_report
    creator = str(rpkg['creator']).split('~')[-1]
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/resource.py", line 693, in __str__
    return self.self_link
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/resource.py", line 700, in __getattr__
    return super(Entry, self).__getattr__(name)
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/resource.py", line 335, in __getattr__
    return self.lp_get_parameter(attr)
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/resource.py", line 219, in lp_get_parameter
    self._ensure_representation()
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/resource.py", line 361, in _ensure_representation
    representation = self._root._browser.get(self._wadl_resource)
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/_browser.py", line 411, in get
    response, content = self._request(url, extra_headers=headers)
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/_browser.py", line 401, in _request
    raise error
lazr.restfulclient.errors.ClientError: HTTP Error 410: Gone

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 'sru-report'
2--- sru-report 2017-03-01 22:10:38 +0000
3+++ sru-report 2017-04-13 22:20:49 +0000
4@@ -111,8 +111,16 @@
5 elif p_pocket == 'Proposed':
6 history['changesfiles'].append(pub.changesFileUrl())
7 history['published'] = p_date_pub
8- history['creator'] = pub.package_creator
9- history['signer'] = pub.package_signer
10+ try:
11+ history['creator'] = str(pub.package_creator)
12+ except ClientError as error:
13+ if error.response['status'] == '410':
14+ history['creator'] = ''
15+ try:
16+ history['signer'] = str(pub.package_signer)
17+ except ClientError as error:
18+ if error.response['status'] == '410':
19+ history['signer'] = ''
20 logging.debug(
21 '%s=%s published to %s/%s on %s' %
22 (sourcename, p_srcpkg_version,
23@@ -382,7 +390,7 @@
24 antique = False
25 except ClientError as error:
26 # people who don't use lp anymore
27- if error == 'Gone':
28+ if error.response['status'] == '410':
29 continue
30 cls += '"'
31

Subscribers

People subscribed via source and target branches