From ec80b0797697c88c18eb90e9ae523a14bf883673 Mon Sep 17 00:00:00 2001 From: Antony Lewis Date: Thu, 22 Aug 2024 10:44:45 +0100 Subject: [PATCH] fix --- cobaya/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cobaya/tools.py b/cobaya/tools.py index d15839ab..903ce6a0 100644 --- a/cobaya/tools.py +++ b/cobaya/tools.py @@ -462,7 +462,7 @@ def truncate_to_end_line(file_name): # Find the last complete line inp.seek(0, 2) # Go to the end of the file pos = inp.tell() - 1 - while pos > 0 and inp.read(1) != "\n": + while pos > 0 and inp.read(1) != b"\n": pos -= 1 inp.seek(pos, 0) if pos > 0: