mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 10:31:50 +01:00
fix: TypeError in CustomFormatter.format
This commit is contained in:
@@ -65,7 +65,10 @@ def configure_console_logging() -> None:
|
|||||||
}
|
}
|
||||||
|
|
||||||
def format(self, record:logging.LogRecord) -> str:
|
def format(self, record:logging.LogRecord) -> str:
|
||||||
record = copy.deepcopy(record)
|
# Deep copy fails if record.args contains objects with
|
||||||
|
# __init__(...) parameters (e.g., CaptchaEncountered).
|
||||||
|
# A shallow copy is sufficient to preserve the original.
|
||||||
|
record = copy.copy(record)
|
||||||
|
|
||||||
level_color = self.LEVEL_COLORS.get(record.levelno, "")
|
level_color = self.LEVEL_COLORS.get(record.levelno, "")
|
||||||
msg_color = self.MESSAGE_COLORS.get(record.levelno, "")
|
msg_color = self.MESSAGE_COLORS.get(record.levelno, "")
|
||||||
|
|||||||
Reference in New Issue
Block a user