Skip to content

Commit 53b6a46

Browse files
Make open calls more uniform
Text mode ('t') is the default for the open builtin, but not for gzip.open and its imitators. Always specify it explicitly to avoid making maintiners wonder if there's an intended difference in behavior. Signed-off-by: Gilles Peskine <[email protected]>
1 parent 1e16e00 commit 53b6a46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/mbedtls_framework/outcome_analysis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def open_outcome_file(outcome_file: str) -> typing.TextIO:
120120
elif outcome_file.endswith('.xz'):
121121
return lzma.open(outcome_file, 'rt', encoding='utf-8')
122122
else:
123-
return open(outcome_file, 'r', encoding='utf-8')
123+
return open(outcome_file, 'rt', encoding='utf-8')
124124

125125
def read_outcome_file(outcome_file: str) -> Outcomes:
126126
"""Parse an outcome file and return an outcome collection.

0 commit comments

Comments
 (0)