~cjwatson/launchpad-buildd/recipe-trusted-local-archive

« back to all changes in this revision

Viewing changes to buildsnap

  • Committer: Colin Watson
  • Date: 2016-08-08 09:58:51 UTC
  • Revision ID: cjwatson@canonical.com-20160808095851-gv0ac7g2co1em68n
buildsnap: Catch urllib2.URLError as well as urllib2.HTTPError when
trying to revoke the proxy token (LP: #1610916).

Show diffs side-by-side

added added

removed removed

Lines of Context:
179
179
        req.get_method = lambda: 'DELETE'
180
180
        try:
181
181
            urllib2.urlopen(req)
182
 
        except urllib2.HTTPError:
183
 
            print('Unable to revoke token for %s' % url.username)
 
182
        except (urllib2.HTTPError, urllib2.URLError) as e:
 
183
            print('Unable to revoke token for %s: %s' % (url.username, e))
184
184
 
185
185
 
186
186
def main():