Skip to content

Commit

Permalink
Make open calls more uniform
Browse files Browse the repository at this point in the history
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 <Gilles.Peskine@arm.com>
  • Loading branch information
gilles-peskine-arm committed Oct 9, 2024
1 parent d63709d commit 6759e80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/mbedtls_framework/outcome_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def open_outcome_file(outcome_file: str) -> typing.TextIO:
elif outcome_file.endswith('.xz'):
return lzma.open(outcome_file, 'rt', encoding='utf-8')
else:
return open(outcome_file, 'r', encoding='utf-8')
return open(outcome_file, 'rt', encoding='utf-8')

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

0 comments on commit 6759e80

Please sign in to comment.