From 27f5e6f0a78d263a6cd3d9314123474ac6f914e9 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Wed, 11 Oct 2023 18:01:56 +0200 Subject: [PATCH] Open the file as binary. --- library/configfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/configfile.py b/library/configfile.py index bcf27d9..62e30ca 100644 --- a/library/configfile.py +++ b/library/configfile.py @@ -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)