From a21335ac171a827a613dcce744898e822689c9d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sun, 7 Apr 2019 23:52:30 +0100 Subject: Remove more safeJID calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- poezio/tabs/basetabs.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'poezio/tabs/basetabs.py') diff --git a/poezio/tabs/basetabs.py b/poezio/tabs/basetabs.py index 5dc94ff8..c6d8b6b6 100644 --- a/poezio/tabs/basetabs.py +++ b/poezio/tabs/basetabs.py @@ -534,7 +534,9 @@ class ChatTab(Tab): """ Log the messages in the archives. """ - name = safeJID(self.name).bare + if self.name is None: + return None + name = self.name.bare if not logger.log_message(name, nickname, txt, date=time, typ=typ): self.core.information('Unable to write in the log file', 'Error') @@ -811,7 +813,7 @@ class OneToOneTab(ChatTab): return self.__status = status hide_status_change = config.get_by_tabname('hide_status_change', - safeJID(self.name).bare) + self.name.bare) now = datetime.now() dff = now - self.last_remote_message if hide_status_change > -1 and dff.total_seconds() > hide_status_change: -- cgit v1.2.3