From d049a1db425c8218615c21edea6d5c14883d5766 Mon Sep 17 00:00:00 2001 From: qx6ghqkz <93668667+qx6ghqkz@users.noreply.github.com> Date: Sat, 11 Jan 2025 09:14:35 +0000 Subject: [PATCH] fix: initialise log record args to empty tuple after formatting message Prevent TypeError caused by arguments still being present in the log record when attempting to format gallery-dl log messages for the second time --- gallery_dl_server/output.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gallery_dl_server/output.py b/gallery_dl_server/output.py index d2a50e8..9be8c6d 100644 --- a/gallery_dl_server/output.py +++ b/gallery_dl_server/output.py @@ -125,6 +125,7 @@ def __init__(self, queue): def emit(self, record): record.msg = remove_ansi_escape_sequences(self.format(record)) + record.args = () record_dict = record_to_dict(record) self.queue.put(record_dict)