spaces and stuff

This commit is contained in:
Nikos Kouremenos 2006-02-02 23:44:09 +00:00
parent 496baa0f0c
commit 65c8646e2e
1 changed files with 6 additions and 4 deletions

View File

@ -101,7 +101,7 @@ class Logger:
def get_jids_already_in_db(self):
self.cur.execute('SELECT jid FROM jids')
rows = self.cur.fetchall() # list of tupples: (u'aaa@bbb',), (u'cc@dd',)]
rows = self.cur.fetchall() # list of tupples: [(u'aaa@bbb',), (u'cc@dd',)]
for row in rows:
# row[0] is first item of row (the only result here, the jid)
self.jids_already_in.append(row[0])
@ -130,6 +130,8 @@ class Logger:
logs table has log_id, jid_id, contact_name, time, kind, show, message
so to ask logs we need jid_id that matches our jid in jids table
this method asks jid and returns the jid_id for later sql-ing on logs
typestr can be 'ROOM' or anything else depending on the type of JID
and is only needed to be specified when the JID is new in DB
'''
if jid.find('/') != -1: # if it has a /
jid_is_from_pm = self.jid_is_from_pm(jid)