Skip to content
Snippets Groups Projects
Commit 567ce86e authored by nkour's avatar nkour
Browse files

remove a var, use hasattr

parent 313f4c8c
No related branches found
No related tags found
No related merge requests found
......@@ -104,7 +104,6 @@ class Logger:
for row in rows:
# row[0] is first item of row (the only result here, the jid)
self.jids_already_in.append(row[0])
GOT_JIDS_ALREADY_IN_DB = True
def jid_is_from_pm(self, jid):
'''if jid is gajim@conf/nkour it's likely a pm one, how we know
......@@ -209,7 +208,7 @@ class Logger:
jids.jid text column will hold JID if TC-related, room_jid if GC-related,
ROOM_JID/nick if pm-related.'''
if not GOT_JIDS_ALREADY_IN_DB:
if not hasattr(self, 'get_jids_already_in_db'):
global con, cur
con = sqlite.connect(LOG_DB_PATH, timeout = 20.0,
isolation_level = 'IMMEDIATE')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment