summaryrefslogtreecommitdiff
path: root/tools/certtools.py
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2015-09-25 19:49:39 +0200
committerLinus Nordberg <linus@nordu.net>2015-09-25 19:49:39 +0200
commit5e01a05f5b0e8d71437ba4267db6aa3784a12a52 (patch)
treee78f8fe1868d29381eba4fa88b604f6a835c3315 /tools/certtools.py
parent300149c520921523f107537be5a3bb20fed829f0 (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.py3
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