Browse Source

Fix multi_rpc test for hosts that dont default to utf8

Otherwise the utf8 written to bitcoin.conf throws an exception when
read from get_auth_cookie
0.15
Matt Corallo 8 years ago
parent
commit
bc7d1032f8
  1. 2
      test/functional/test_framework/util.py

2
test/functional/test_framework/util.py

@ -236,7 +236,7 @@ def get_auth_cookie(datadir, n):
user = None user = None
password = None password = None
if os.path.isfile(os.path.join(datadir, "bitcoin.conf")): if os.path.isfile(os.path.join(datadir, "bitcoin.conf")):
with open(os.path.join(datadir, "bitcoin.conf"), 'r') as f: with open(os.path.join(datadir, "bitcoin.conf"), 'r', encoding='utf8') as f:
for line in f: for line in f:
if line.startswith("rpcuser="): if line.startswith("rpcuser="):
assert user is None # Ensure that there is only one rpcuser line assert user is None # Ensure that there is only one rpcuser line

Loading…
Cancel
Save