> Add a try except block in the _write_to_disk method
> Fixed some indents
Looks good. Feel free to commit this part already.

> Add a counter to write to disk upon every 20 events
Why every 20 events? I don't like this, too arbitrary (and it ends writing to 
disk a lot again).

Also, shouldn't really matter much, but I don't like the modulo approach, since 
it's doing a useless division and the variable can overflow. Something like 
this would look nicer to me:
if self._counter == 0:
    self._write_to_disk()
    self._counter = 19
else:
    self._counter -= 1
-- 
https://code.launchpad.net/~seif/zeitgeist/fix-738555/+merge/58818
Your team Zeitgeist Framework Team is requested to review the proposed merge of 
lp:~seif/zeitgeist/fix-738555 into lp:zeitgeist.

_______________________________________________
Mailing list: https://launchpad.net/~zeitgeist
Post to     : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp

Reply via email to