prevent a tb

This commit is contained in:
Nikos Kouremenos 2005-12-26 18:23:57 +00:00
parent 72dbd583e0
commit 815e07771b
1 changed files with 7 additions and 1 deletions

View File

@ -402,5 +402,11 @@ class Logger:
AND kind NOT IN (?, ?)
ORDER BY time DESC LIMIT 1
''', (jid_id, constants.KIND_STATUS, constants.KIND_GCSTATUS))
result = self.cur.fetchone()[0]
results = self.cur.fetchone()
if len(results) > 0:
result = results[0]
else:
result = None
return result