diff options
author | Magnus Ahltorp <map@kth.se> | 2016-03-09 06:58:08 +0100 |
---|---|---|
committer | Magnus Ahltorp <map@kth.se> | 2016-03-09 06:58:08 +0100 |
commit | 15d65c756fe89aca6cbcc754dc648853ca334095 (patch) | |
tree | 9950617fddb5ac45fac58d30fdf302de512bcd65 /tools/merge_sth.py | |
parent | 1a9625f9fb0fb369246188e047a3919b8f69c845 (diff) |
Use python requests package instead of urllib2
Diffstat (limited to 'tools/merge_sth.py')
-rwxr-xr-x | tools/merge_sth.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/merge_sth.py b/tools/merge_sth.py index 567082c..cf1e994 100755 --- a/tools/merge_sth.py +++ b/tools/merge_sth.py @@ -8,6 +8,7 @@ import sys import json import urllib2 import time +import requests from base64 import b64encode from mergetools import parse_args, get_nfetched, hexencode, hexdecode, \ get_logorder, get_sth @@ -83,8 +84,8 @@ def merge_sth(args, config, localconfig): "https://%s/" % signingnode["address"], key=own_key) break - except urllib2.URLError, err: - print >>sys.stderr, err + except requests.exceptions.HTTPError, e: + print >>sys.stderr, e.response sys.stderr.flush() if tree_head_signature == None: print >>sys.stderr, "Could not contact any signing nodes" |