From a3fcfd3ffdb73bc3d0f90edb10c77fcaddb8800f Mon Sep 17 00:00:00 2001 From: mathieui Date: Fri, 9 Apr 2021 22:00:13 +0200 Subject: fix: make the jid optional when parsing a log line --- poezio/logger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/poezio/logger.py b/poezio/logger.py index 8451cd23..329b9283 100644 --- a/poezio/logger.py +++ b/poezio/logger.py @@ -63,7 +63,7 @@ class LogMessage(LogItem): self.nick = nick -def parse_log_line(msg: str, jid: str) -> Optional[LogItem]: +def parse_log_line(msg: str, jid: str = '') -> Optional[LogItem]: """Parse a log line. :param msg: The message ligne @@ -309,7 +309,7 @@ def _get_lines_from_fd(fd: IO[Any], nb: int = 10) -> List[str]: return lines -def parse_log_lines(lines: List[str], jid: str) -> List[Dict[str, Any]]: +def parse_log_lines(lines: List[str], jid: str = '') -> List[Dict[str, Any]]: """ Parse raw log lines into poezio log objects -- cgit v1.2.3