diff options
author | Bryan Bishop <kanzure@gmail.com> | 2014-11-14 09:12:41 -0600 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2014-11-14 09:12:41 -0600 |
commit | a7af9839d688bee9b0b15add61259140b3c00014 (patch) | |
tree | 09bcb8049b689f1a044ed6f431a627fcdb8663d0 /qa/rpc-tests/util.py | |
parent | 3d3ce7421e11ed693840e04bee4d18fb9d396309 (diff) |
don't override dir() in qa rpc tests
Replace "dir" with "dirname" in util.py in qa/rpc-tests/ because "dir"
is the name of a function in python.
Diffstat (limited to 'qa/rpc-tests/util.py')
-rw-r--r-- | qa/rpc-tests/util.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py index e5383b6c57..0d5eeefa79 100644 --- a/qa/rpc-tests/util.py +++ b/qa/rpc-tests/util.py @@ -61,8 +61,8 @@ def sync_mempools(rpc_connections): bitcoind_processes = {} -def initialize_datadir(dir, n): - datadir = os.path.join(dir, "node"+str(n)) +def initialize_datadir(dirname, n): + datadir = os.path.join(dirname, "node"+str(n)) if not os.path.isdir(datadir): os.makedirs(datadir) with open(os.path.join(datadir, "bitcoin.conf"), 'w') as f: @@ -145,11 +145,11 @@ def _rpchost_to_args(rpchost): rv += ['-rpcport=' + rpcport] return rv -def start_node(i, dir, extra_args=None, rpchost=None): +def start_node(i, dirname, extra_args=None, rpchost=None): """ Start a bitcoind and return RPC connection to it """ - datadir = os.path.join(dir, "node"+str(i)) + datadir = os.path.join(dirname, "node"+str(i)) args = [ os.getenv("BITCOIND", "bitcoind"), "-datadir="+datadir, "-keypool=1", "-discover=0" ] if extra_args is not None: args.extend(extra_args) bitcoind_processes[i] = subprocess.Popen(args) @@ -163,15 +163,15 @@ def start_node(i, dir, extra_args=None, rpchost=None): proxy.url = url # store URL on proxy for info return proxy -def start_nodes(num_nodes, dir, extra_args=None, rpchost=None): +def start_nodes(num_nodes, dirname, extra_args=None, rpchost=None): """ Start multiple bitcoinds, return RPC connections to them """ if extra_args is None: extra_args = [ None for i in range(num_nodes) ] - return [ start_node(i, dir, extra_args[i], rpchost) for i in range(num_nodes) ] + return [ start_node(i, dirname, extra_args[i], rpchost) for i in range(num_nodes) ] -def log_filename(dir, n_node, logname): - return os.path.join(dir, "node"+str(n_node), "regtest", logname) +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() |