From 5e01a05f5b0e8d71437ba4267db6aa3784a12a52 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Fri, 25 Sep 2015 19:49:39 +0200 Subject: Add a test for when merge backup fails. Also, avoid tracebacks on ECONNREFUSED by catching urrllib2.URLError. --- tools/certtools.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools/certtools.py') 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 -- cgit v1.1