Skip to content

Commit 8c25c1d

Browse files
committed
Merge petertodd#151: parse authpair when using service url
ee7fe43 parse authpair when using service url (Simon Mulser) Pull request description: Tree-SHA512: 28a86f5e294771a5c8efb7e7f9d516210aa609664acafbfdfafff1cfa8856741a87367dabc0486cf83641600ad65be58e29931165256bf4071e3cbd8b2e24e25
2 parents 2cd65b7 + ee7fe43 commit 8c25c1d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bitcoin/rpc.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ def __init__(self,
175175

176176
else:
177177
raise ValueError('Cookie file unusable (%s) and rpcpassword not specified in the configuration file: %r' % (err, btc_conf_file))
178+
else:
179+
url = urlparse.urlparse(service_url)
180+
authpair = "%s:%s" % (url.username, url.password)
178181

179182
self.__service_url = service_url
180183
self.__url = urlparse.urlparse(service_url)

0 commit comments

Comments
 (0)