summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-03-25 22:27:59 +0100
committermathieui <mathieui@mathieui.net>2021-04-02 17:44:36 +0200
commit2dfb5096b940e9a9ad6ef16886e3b895f2dabab7 (patch)
treeebf5d344dd28d3f4998b89c92682a41c3d6e27fd
parent0db73f722f875a1c9ef439d78c67971a244665f1 (diff)
downloadpoezio-2dfb5096b940e9a9ad6ef16886e3b895f2dabab7.tar.gz
poezio-2dfb5096b940e9a9ad6ef16886e3b895f2dabab7.tar.bz2
poezio-2dfb5096b940e9a9ad6ef16886e3b895f2dabab7.tar.xz
poezio-2dfb5096b940e9a9ad6ef16886e3b895f2dabab7.zip
fix: incompatible type passed to logger
-rw-r--r--poezio/tabs/basetabs.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/poezio/tabs/basetabs.py b/poezio/tabs/basetabs.py
index 0d860adb..75d8bf71 100644
--- a/poezio/tabs/basetabs.py
+++ b/poezio/tabs/basetabs.py
@@ -602,7 +602,11 @@ class ChatTab(Tab):
name = self.jid.bare
if not isinstance(message, Message):
return
- if not logger.log_message(name, message.nickname, message.txt, date=message.time, typ=typ):
+ was_logged = logger.log_message(
+ name, message.nickname or '', message.txt,
+ date=message.time, typ=typ
+ )
+ if not was_logged:
self.core.information('Unable to write in the log file', 'Error')
def add_message(self, message: BaseMessage, typ=1):