Open the file as binary.

This commit is contained in:
Andrea Dell'Amico 2023-10-11 18:01:56 +02:00
parent 643ca47814
commit 27f5e6f0a7
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ def run_configfile_module():
changed = False
with open(path, 'r') as input:
with open(path, 'rb') as input:
with tempfile.NamedTemporaryFile(dir=os.path.dirname(path)) as temp:
for line in input:
print(expand(line), end=' ', file=temp)