aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-01-23 14:00:34 -0500
committerMarcoFalke <falke.marco@gmail.com>2018-01-23 13:57:34 -0500
commitfae7b14a0468fba43ca8ce87249be69e13cea608 (patch)
treec3658096ba54d800a2ba9176b65f7bb81c909ca9 /test/functional/test_framework
parentffffb10a9f12b43d4716048ebfd7203bd79e59f3 (diff)
qa: Make TestNodeCLI command optional in send_cli
Diffstat (limited to 'test/functional/test_framework')
-rwxr-xr-xtest/functional/test_framework/test_node.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py
index d9dd945bdd..5dada3cbbc 100755
--- a/test/functional/test_framework/test_node.py
+++ b/test/functional/test_framework/test_node.py
@@ -238,7 +238,7 @@ class TestNodeCLI():
results.append(dict(error=e))
return results
- def send_cli(self, command, *args, **kwargs):
+ def send_cli(self, command=None, *args, **kwargs):
"""Run bitcoin-cli command. Deserializes returned string as python object."""
pos_args = [str(arg) for arg in args]
@@ -247,7 +247,9 @@ class TestNodeCLI():
p_args = [self.binary, "-datadir=" + self.datadir] + self.options
if named_args:
p_args += ["-named"]
- p_args += [command] + pos_args + named_args
+ if command is not None:
+ p_args += [command]
+ p_args += pos_args + named_args
self.log.debug("Running bitcoin-cli command: %s" % command)
process = subprocess.Popen(p_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
cli_stdout, cli_stderr = process.communicate(input=self.input)