Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dosbox-staging/dosbox-staging.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkcgen <1557255+kcgen@users.noreply.github.com>2021-08-21 02:46:28 +0300
committerkcgen <1557255+kcgen@users.noreply.github.com>2021-08-21 02:52:10 +0300
commit80bd2ff78d93e59708e177cae3eef386c32738ae (patch)
tree38cb5bde1dc8be1ccc8453ee2991933ffaa48a92 /scripts
parentb98597d3aefdfefda44074fcd35dce361c2773d0 (diff)
Specify encoding on-open in Python scripts
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/count-clang-bugs.py2
-rwxr-xr-xscripts/count-pvs-bugs.py2
-rwxr-xr-xscripts/count-warnings.py2
-rwxr-xr-xscripts/count-xsan-issues.py2
4 files changed, 4 insertions, 4 deletions
diff --git a/scripts/count-clang-bugs.py b/scripts/count-clang-bugs.py
index 7fcbb3be2..bbdde20b7 100755
--- a/scripts/count-clang-bugs.py
+++ b/scripts/count-clang-bugs.py
@@ -42,7 +42,7 @@ def summary_values(summary_table):
def read_soup(index_html):
- with open(index_html) as index:
+ with open(index_html, encoding='utf-8') as index:
soup = BeautifulSoup(index, 'html5lib')
tables = soup.find_all('table')
summary = tables[1]
diff --git a/scripts/count-pvs-bugs.py b/scripts/count-pvs-bugs.py
index 3e67efcd8..ef27b778f 100755
--- a/scripts/count-pvs-bugs.py
+++ b/scripts/count-pvs-bugs.py
@@ -31,7 +31,7 @@ def parse_issues(filename):
"""
cwd = os.getcwd()
issues = collections.defaultdict(int)
- with open(filename) as csvfile:
+ with open(filename, encoding='utf-8') as csvfile:
reader = csv.DictReader(csvfile)
for row in reader:
sourcefile = os.path.realpath(row['FilePath'])
diff --git a/scripts/count-warnings.py b/scripts/count-warnings.py
index 4f615d41a..f656064b1 100755
--- a/scripts/count-warnings.py
+++ b/scripts/count-warnings.py
@@ -112,7 +112,7 @@ def get_input_lines(name):
if not os.path.isfile(name):
print('{}: no such file.'.format(name))
sys.exit(2)
- with open(name, 'r') as logs:
+ with open(name, 'r', encoding='utf-8') as logs:
return logs.readlines()
diff --git a/scripts/count-xsan-issues.py b/scripts/count-xsan-issues.py
index 4ce907cbc..94a5edf95 100755
--- a/scripts/count-xsan-issues.py
+++ b/scripts/count-xsan-issues.py
@@ -82,7 +82,7 @@ def get_input_lines(name):
if not os.path.isfile(name):
print('{}: no such file.'.format(name))
sys.exit(2)
- with open(name, 'r') as logs:
+ with open(name, 'r', encoding='utf-8') as logs:
return logs.readlines()