Allow to set self.stderr when using vanilla setup_nodes()

This commit is contained in:
Alexander Block 2019-09-24 00:54:26 +02:00
parent 8ba042b58e
commit 39a1c6452f

View File

@ -220,9 +220,12 @@ class BitcoinTestFramework(object):
def setup_nodes(self): def setup_nodes(self):
"""Override this method to customize test node setup""" """Override this method to customize test node setup"""
extra_args = None extra_args = None
stderr = None
if hasattr(self, "extra_args"): if hasattr(self, "extra_args"):
extra_args = self.extra_args extra_args = self.extra_args
self.add_nodes(self.num_nodes, extra_args) if hasattr(self, "stderr"):
stderr = self.stderr
self.add_nodes(self.num_nodes, extra_args, stderr=stderr)
self.start_nodes() self.start_nodes()
def run_test(self): def run_test(self):