summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2016-11-28 00:08:45 +0100
committerLinus Nordberg <linus@nordu.net>2016-11-28 00:08:45 +0100
commit2b6eded0d3c39b0b3c886577e5755b169faab233 (patch)
tree0a0ef2fb4ecc8100a760f0ff48849ba8a14c4de8
parent0ab46454d49fdc76a471c4142c35c6a5af40c828 (diff)
Do remove process from procs dict when they fail too.
-rwxr-xr-xtools/merge_backup.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/merge_backup.py b/tools/merge_backup.py
index b0c7289..56b5b57 100755
--- a/tools/merge_backup.py
+++ b/tools/merge_backup.py
@@ -195,11 +195,11 @@ def merge_backup(args, config, localconfig, secondaries):
if not p.is_alive():
p.join()
nodename, pipe = procs[p]
- if p.exitcode != 0:
+ if p.exitcode == 0:
+ root_hash = pipe.recv()
+ update_backupfile(mergedb, nodename, tree_size, root_hash)
+ else:
logging.warning("%s failure: %d", nodename, p.exitcode)
- continue
- root_hash = pipe.recv()
- update_backupfile(mergedb, nodename, tree_size, root_hash)
del procs[p]
if not procs:
break