diff options
author | MarcoFalke <falke.marco@gmail.com> | 2016-04-30 14:55:31 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2016-05-06 12:44:03 +0200 |
commit | fafb33cdefd2d8ce065263978075d26a1672b630 (patch) | |
tree | a3f144fbfb8dec3455fe4f7a071b5f50855eb073 /qa | |
parent | 2222dae6e31c433f83aa9fd0e8f028cbee59199b (diff) |
[qa] Stop other nodes, even when one fails to stop
Diffstat (limited to 'qa')
-rw-r--r-- | qa/rpc-tests/test_framework/util.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/qa/rpc-tests/test_framework/util.py b/qa/rpc-tests/test_framework/util.py index 4c129b78b5..6dc685ea1b 100644 --- a/qa/rpc-tests/test_framework/util.py +++ b/qa/rpc-tests/test_framework/util.py @@ -16,6 +16,7 @@ from binascii import hexlify, unhexlify from base64 import b64encode from decimal import Decimal, ROUND_DOWN import json +import http.client import random import shutil import subprocess @@ -316,13 +317,19 @@ def log_filename(dirname, n_node, logname): return os.path.join(dirname, "node"+str(n_node), "regtest", logname) def stop_node(node, i): - node.stop() + try: + node.stop() + except http.client.CannotSendRequest as e: + print("WARN: Unable to stop node: " + repr(e)) bitcoind_processes[i].wait() del bitcoind_processes[i] def stop_nodes(nodes): for node in nodes: - node.stop() + try: + node.stop() + except http.client.CannotSendRequest as e: + print("WARN: Unable to stop node: " + repr(e)) del nodes[:] # Emptying array closes connections as a side effect def set_node_times(nodes, t): |