From 634bd970013eca90f4b4c1f9044eec8c97ba62c2 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Tue, 12 Jun 2018 17:49:20 +0200 Subject: Explicitly specify encoding when opening text files in Python code --- test/lint/check-rpc-mappings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/lint') 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: -- cgit v1.2.3