Fix pylint errors

- used-before-assignment
- misplaced-bare-raise
This commit is contained in:
Philipp Hörist 2018-09-18 16:29:26 +02:00
parent 6b54863157
commit c3e897bdb4
1 changed files with 2 additions and 7 deletions

View File

@ -45,6 +45,7 @@ from gi.repository import Gio
from gajim.common import app from gajim.common import app
from gajim.common import i18n from gajim.common import i18n
from gajim.common import configpaths from gajim.common import configpaths
from gajim.common.i18n import _
from gajim.common.const import StyleAttr from gajim.common.const import StyleAttr
def is_standalone(): def is_standalone():
@ -80,7 +81,6 @@ if is_standalone():
configpaths.init() configpaths.init()
app.load_css_config() app.load_css_config()
from gajim.common.i18n import _
from gajim.common.const import JIDConstant, KindConstant from gajim.common.const import JIDConstant, KindConstant
from gajim.common import helpers from gajim.common import helpers
from gajim.gtk import YesNoDialog from gajim.gtk import YesNoDialog
@ -346,12 +346,7 @@ class HistoryManager:
""" """
self.cur.execute('SELECT type FROM jids WHERE jid = ?', (jid,)) self.cur.execute('SELECT type FROM jids WHERE jid = ?', (jid,))
row = self.cur.fetchone() row = self.cur.fetchone()
if row is None: return row[0] == JIDConstant.ROOM_TYPE
raise
elif row[0] == JIDConstant.ROOM_TYPE:
return True
else: # normal type
return False
def _fill_logs_listview(self, jid): def _fill_logs_listview(self, jid):
""" """