summaryrefslogtreecommitdiff
path: root/tools/merge_fetch.py
diff options
context:
space:
mode:
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()