mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-06-05 21:15:09 +00:00
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 <Gilles.Peskine@arm.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user