summaryrefslogtreecommitdiff
path: root/tools/merge_sth.py
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2016-03-09 06:58:08 +0100
committerMagnus Ahltorp <map@kth.se>2016-03-09 06:58:08 +0100
commit15d65c756fe89aca6cbcc754dc648853ca334095 (patch)
tree9950617fddb5ac45fac58d30fdf302de512bcd65 /tools/merge_sth.py
parent1a9625f9fb0fb369246188e047a3919b8f69c845 (diff)
Use python requests package instead of urllib2
Diffstat (limited to 'tools/merge_sth.py')
-rwxr-xr-xtools/merge_sth.py5
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"