Skip to content

Commit

Permalink
fix: initialise log record args to empty tuple after formatting message
Browse files Browse the repository at this point in the history
Prevent TypeError caused by arguments still being present in the log record when attempting to format gallery-dl log messages for the second time
  • Loading branch information
qx6ghqkz committed Jan 11, 2025
1 parent 4df03af commit d049a1d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gallery_dl_server/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d049a1d

Please sign in to comment.