diff options
author | mathieui <mathieui@mathieui.net> | 2021-04-09 22:00:13 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2021-04-11 16:33:53 +0200 |
commit | a3fcfd3ffdb73bc3d0f90edb10c77fcaddb8800f (patch) | |
tree | 81d5ce31368040f4a7dded66675a053ac97ccdca | |
parent | 8cbe41eba8426ff402cd0132bd6e69253018ab20 (diff) | |
download | poezio-a3fcfd3ffdb73bc3d0f90edb10c77fcaddb8800f.tar.gz poezio-a3fcfd3ffdb73bc3d0f90edb10c77fcaddb8800f.tar.bz2 poezio-a3fcfd3ffdb73bc3d0f90edb10c77fcaddb8800f.tar.xz poezio-a3fcfd3ffdb73bc3d0f90edb10c77fcaddb8800f.zip |
fix: make the jid optional when parsing a log line
-rw-r--r-- | poezio/logger.py | 4 |
1 files 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 |