Skip to content

Commit ef76253

Browse files
committed
Merge #168: look for .cookie file in datadir if specified
e080ec2 look for .cookie file in datadir if specified (Jon Larimer) Pull request description: If datadir is specified in bitcoin.conf, bitcoind will write the .cookie file there. Tree-SHA512: a281b4577c5bd51e01e1384988e01b97945b9b1998dd8b3933c16cf9f999c4ec309cf4fb060ec913c1b83eb651b27379fef1a0e68029a6e5212d8cb8b8ed8085
2 parents ca1ef88 + e080ec2 commit ef76253

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bitcoin/rpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def __init__(self,
162162
service_url = ('%s://%s:%d' %
163163
('http', conf['rpchost'], conf['rpcport']))
164164

165-
cookie_dir = os.path.dirname(btc_conf_file)
165+
cookie_dir = conf.get('datadir', os.path.dirname(btc_conf_file))
166166
if bitcoin.params.NAME != "mainnet":
167167
cookie_dir = os.path.join(cookie_dir, bitcoin.params.NAME)
168168
cookie_file = os.path.join(cookie_dir, ".cookie")

0 commit comments

Comments
 (0)