aboutsummaryrefslogtreecommitdiff
path: root/test/lint
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2018-06-12 17:49:20 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2018-06-12 21:34:52 +0200
commit634bd970013eca90f4b4c1f9044eec8c97ba62c2 (patch)
treecf308babc695722ab55344bcd27b1b68802ce3f9 /test/lint
parentfa4b9065a8298f546d91fe382b4517fbf30749c1 (diff)
downloadbitcoin-634bd970013eca90f4b4c1f9044eec8c97ba62c2.tar.xz
Explicitly specify encoding when opening text files in Python code
Diffstat (limited to 'test/lint')
-rwxr-xr-xtest/lint/check-rpc-mappings.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lint/check-rpc-mappings.py b/test/lint/check-rpc-mappings.py
index 7e96852c5c..c3cdeef580 100755
--- a/test/lint/check-rpc-mappings.py
+++ b/test/lint/check-rpc-mappings.py
@@ -44,7 +44,7 @@ def process_commands(fname):
"""Find and parse dispatch table in implementation file `fname`."""
cmds = []
in_rpcs = False
- with open(fname, "r") as f:
+ with open(fname, "r", encoding="utf8") as f:
for line in f:
line = line.rstrip()
if not in_rpcs:
@@ -70,7 +70,7 @@ def process_mapping(fname):
"""Find and parse conversion table in implementation file `fname`."""
cmds = []
in_rpcs = False
- with open(fname, "r") as f:
+ with open(fname, "r", encoding="utf8") as f:
for line in f:
line = line.rstrip()
if not in_rpcs: