[qa]: add parsing for '<host>:<port>' argument form to rpc_url()

This commit is contained in:
whythat 2016-07-25 01:30:28 +03:00 committed by Jack Grigg
parent 2fc450d94e
commit 3c7f4ca809
1 changed files with 9 additions and 1 deletions

View File

@ -183,7 +183,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):
'''