From 08cfe09ae4d86fca42507d8d5040cdaf0e3166b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Tue, 18 Sep 2018 16:29:26 +0200 Subject: [PATCH] Fix pylint errors - used-before-assignment - misplaced-bare-raise --- gajim/history_manager.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/gajim/history_manager.py b/gajim/history_manager.py index d8c8dce3c..295608c0d 100644 --- a/gajim/history_manager.py +++ b/gajim/history_manager.py @@ -45,6 +45,7 @@ from gi.repository import Gio from gajim.common import app from gajim.common import i18n from gajim.common import configpaths +from gajim.common.i18n import _ from gajim.common.const import StyleAttr def is_standalone(): @@ -80,7 +81,6 @@ if is_standalone(): configpaths.init() app.load_css_config() -from gajim.common.i18n import _ from gajim.common.const import JIDConstant, KindConstant from gajim.common import helpers from gajim.gtk import YesNoDialog @@ -346,12 +346,7 @@ class HistoryManager: """ self.cur.execute('SELECT type FROM jids WHERE jid = ?', (jid,)) row = self.cur.fetchone() - if row is None: - raise - elif row[0] == JIDConstant.ROOM_TYPE: - return True - else: # normal type - return False + return row[0] == JIDConstant.ROOM_TYPE def _fill_logs_listview(self, jid): """