mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-09-18 16:19:54 +00:00
Use the FileInput class
This avoids potential concurrency and reentrancy issues from `fileinput.input()` which uses global state. Signed-off-by: Gilles Peskine <[email protected]>
This commit is contained in:
@@ -230,8 +230,8 @@ class GeneratorInputError(Exception):
|
||||
|
||||
|
||||
def read_file(file_name: str) -> fileinput.FileInput:
|
||||
return fileinput.input([file_name],
|
||||
openhook=fileinput.hook_encoded('utf-8'))
|
||||
return fileinput.FileInput([file_name],
|
||||
openhook=fileinput.hook_encoded('utf-8'))
|
||||
|
||||
|
||||
def split_dep(dep):
|
||||
|
||||
Reference in New Issue
Block a user