zeitgeist team mailing list archive
-
zeitgeist team
-
Mailing list archive
-
Message #02402
[Merge] lp:~seif/zeitgeist/fix-673922 into lp:zeitgeist
Seif Lotfy has proposed merging lp:~seif/zeitgeist/fix-673922 into lp:zeitgeist.
Requested reviews:
Zeitgeist Framework Team (zeitgeist)
Related bugs:
#673922 ZeitgeistEngine.get_events(rows=x) is broken
https://bugs.launchpad.net/bugs/673922
I removed rows from get_events since it is not being used at all
this fixes bug #673922
--
https://code.launchpad.net/~seif/zeitgeist/fix-673922/+merge/40734
Your team Zeitgeist Framework Team is requested to review the proposed merge of lp:~seif/zeitgeist/fix-673922 into lp:zeitgeist.
=== modified file '_zeitgeist/engine/main.py'
--- _zeitgeist/engine/main.py 2010-11-12 11:38:31 +0000
+++ _zeitgeist/engine/main.py 2010-11-12 15:56:15 +0000
@@ -155,23 +155,20 @@
getattr(self, "_" + field).value(row["subj_" + field]))
return subject
- def get_events(self, ids=None, rows=None, sender=None):
+ def get_events(self, ids=None, sender=None):
"""
Look up a list of events.
"""
t = time.time()
- if not ids and not rows:
+ if not ids:
return []
- if ids:
- rows = self._cursor.execute("""
- SELECT * FROM event_view
- WHERE id IN (%s)
- """ % ",".join("%d" % id for id in ids)).fetchall()
- else:
- ids = (row[0] for row in rows)
+ rows = self._cursor.execute("""
+ SELECT * FROM event_view
+ WHERE id IN (%s)
+ """ % ",".join("%d" % id for id in ids)).fetchall()
id_hash = defaultdict(list)
for n, id in enumerate(ids):
Follow ups