Skip to content

Commit bc7d103

Browse files
committed
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
1 parent 5af6572 commit bc7d103

File tree

1 file changed

+1
-1
lines changed
  • test/functional/test_framework

1 file changed

+1
-1
lines changed

test/functional/test_framework/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def get_auth_cookie(datadir, n):
236236
user = None
237237
password = None
238238
if os.path.isfile(os.path.join(datadir, "bitcoin.conf")):
239-
with open(os.path.join(datadir, "bitcoin.conf"), 'r') as f:
239+
with open(os.path.join(datadir, "bitcoin.conf"), 'r', encoding='utf8') as f:
240240
for line in f:
241241
if line.startswith("rpcuser="):
242242
assert user is None # Ensure that there is only one rpcuser line

0 commit comments

Comments
 (0)