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:
Gilles Peskine
2026-08-21 13:52:45 +02:00
parent f2ee5449e6
commit 515caedf1a
+2 -2
View File
@@ -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):