diff options
author | Linus Nordberg <linus@nordu.net> | 2015-09-25 19:49:39 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2015-11-10 12:48:47 +0100 |
commit | 87e5dd2bfd293f229bab472e946ef12580facf6c (patch) | |
tree | 30f1fb6331d8db74aa454fb06be1debcdac7cd7f /tools/certtools.py | |
parent | 5825db44c73510e71e34f020e3efd03bd49ffd0c (diff) |
Add a test for when merge backup fails.
Also, avoid tracebacks on ECONNREFUSED by catching urrllib2.URLError.
Diffstat (limited to 'tools/certtools.py')
-rw-r--r-- | tools/certtools.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/certtools.py b/tools/certtools.py index 49f4b34..6cb4f55 100644 --- a/tools/certtools.py +++ b/tools/certtools.py @@ -311,6 +311,9 @@ def get_signature(baseurl, data, key=None): result = http_request(baseurl + "plop/v1/signing/sth", params, key=key) parsed_result = json.loads(result) return base64.b64decode(parsed_result.get(u"result")) + except urllib2.URLError, e: + print >>sys.stderr, "ERROR: get_signature", e.reason + sys.exit(1) except urllib2.HTTPError, e: print "ERROR: get_signature", e.read() raise e |