summaryrefslogtreecommitdiff
path: root/tools/merge_sth.py
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2016-07-11 15:00:29 +0200
committerLinus Nordberg <linus@nordu.net>2016-07-11 15:00:29 +0200
commit3d4a9fdd338713c2f63da2b92940904762878d98 (patch)
tree2e8ee7375619d507f0f206be2c713aa12d17f048 /tools/merge_sth.py
parent1a36628401658def9ab9595f7cbcf72b8cb4eb6a (diff)
parentbbf254d6d7f1708503f425c0eb8926af1b715b9c (diff)
Merge remote-tracking branch 'refs/remotes/map/python-requests-chunked'
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 94d3ef2..28ad34f 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
@@ -82,8 +83,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"