summaryrefslogtreecommitdiff
path: root/tools/merge_fetch.py
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2017-03-09 15:17:58 +0100
committerLinus Nordberg <linus@nordu.net>2017-03-09 15:17:58 +0100
commit863ef44a16759501c7ce939e93bf2891a552b2e3 (patch)
tree0fc28971759e60a044425d6d3f45ccfb596ed2e0 /tools/merge_fetch.py
parent221c6771035d7a3c1e0441a46248a44ca2e99077 (diff)
parenta08cb72fa60bdb11873a2409c3b5aa8ff2b4667d (diff)
Merge remote-tracking branch 'refs/remotes/map/refactor-tests'
Diffstat (limited to 'tools/merge_fetch.py')
-rwxr-xr-xtools/merge_fetch.py23
1 files changed, 15 insertions, 8 deletions
diff --git a/tools/merge_fetch.py b/tools/merge_fetch.py
index 42a3089..e71d3f1 100755
--- a/tools/merge_fetch.py
+++ b/tools/merge_fetch.py
@@ -38,14 +38,17 @@ def merge_fetch(args, config, localconfig):
entries_to_fetch = {}
for storagenode in storagenodes:
- print >>sys.stderr, "getting new entries from", storagenode["name"]
- sys.stderr.flush()
- new_entries_per_node[storagenode["name"]] = \
- set(get_new_entries(storagenode["name"],
- "https://%s/" % storagenode["address"],
- own_key, paths))
- new_entries.update(new_entries_per_node[storagenode["name"]])
- entries_to_fetch[storagenode["name"]] = []
+ try:
+ print >>sys.stderr, "getting new entries from", storagenode["name"]
+ sys.stderr.flush()
+ new_entries_per_node[storagenode["name"]] = \
+ set(get_new_entries(storagenode["name"],
+ "https://%s/" % storagenode["address"],
+ own_key, paths))
+ new_entries.update(new_entries_per_node[storagenode["name"]])
+ entries_to_fetch[storagenode["name"]] = []
+ except requests.exceptions.ConnectionError:
+ pass
timing_point(timing, "get new entries")
new_entries -= certsinlog
@@ -54,6 +57,8 @@ def merge_fetch(args, config, localconfig):
for ehash in new_entries:
for storagenode in storagenodes:
+ if storagenode["name"] not in new_entries_per_node:
+ continue
if ehash in new_entries_per_node[storagenode["name"]]:
entries_to_fetch[storagenode["name"]].append(ehash)
break
@@ -64,6 +69,8 @@ def merge_fetch(args, config, localconfig):
added_entries = 0
for storagenode in storagenodes:
+ if storagenode["name"] not in entries_to_fetch:
+ continue
print >>sys.stderr, "getting %d entries from %s:" % \
(len(entries_to_fetch[storagenode["name"]]), storagenode["name"]),
sys.stderr.flush()