diff options
| author | MarcoFalke <[email protected]> | 2016-07-31 17:22:17 +0200 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2016-07-31 17:22:30 +0200 |
| commit | cf2cecb18779ce83de9adebf382dff1c19b12840 (patch) | |
| tree | 5f73cff389e83127b06c0ea0cc77b91cf91820d2 /qa/rpc-tests/test_framework | |
| parent | Merge #8238: [WIP][depends] ZeroMQ 4.1.5 && ZMQ on Windows (diff) | |
| parent | [qa]: enable rpcbind_test (diff) | |
| download | archived-discoin-cf2cecb18779ce83de9adebf382dff1c19b12840.tar.xz archived-discoin-cf2cecb18779ce83de9adebf382dff1c19b12840.zip | |
Merge #8400: [qa]: enable rpcbind_test
9bbb414 [qa]: enable rpcbind_test (whythat)
0ff4375 [qa]: add parsing for '<host>:<port>' argument form to rpc_url() (whythat)
Diffstat (limited to 'qa/rpc-tests/test_framework')
| -rw-r--r-- | qa/rpc-tests/test_framework/util.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/qa/rpc-tests/test_framework/util.py b/qa/rpc-tests/test_framework/util.py index 32fe79efc..8aa34265c 100644 --- a/qa/rpc-tests/test_framework/util.py +++ b/qa/rpc-tests/test_framework/util.py @@ -171,7 +171,15 @@ def rpc_auth_pair(n): def rpc_url(i, rpchost=None): rpc_u, rpc_p = rpc_auth_pair(i) - return "http://%s:%s@%s:%d" % (rpc_u, rpc_p, rpchost or '127.0.0.1', rpc_port(i)) + host = '127.0.0.1' + port = rpc_port(i) + if rpchost: + parts = rpchost.split(':') + if len(parts) == 2: + host, port = parts + else: + host = rpchost + return "http://%s:%s@%s:%d" % (rpc_u, rpc_p, host, int(port)) def wait_for_bitcoind_start(process, url, i): ''' |