hamster-applet r626 - trunk/hamster
- From: tbaugis svn gnome org
- To: svn-commits-list gnome org
- Subject: hamster-applet r626 - trunk/hamster
- Date: Sun, 16 Nov 2008 11:03:44 +0000 (UTC)
Author: tbaugis
Date: Sun Nov 16 11:03:43 2008
New Revision: 626
URL: http://svn.gnome.org/viewvc/hamster-applet?rev=626&view=rev
Log:
good old trick with failing when there is no last activity
Modified:
trunk/hamster/reports.py
Modified: trunk/hamster/reports.py
==============================================================================
--- trunk/hamster/reports.py (original)
+++ trunk/hamster/reports.py Sun Nov 16 11:03:43 2008
@@ -109,7 +109,7 @@
</tr>""")
#get id of last activity so we know when to show current duration
- last_activity_id = storage.get_last_activity()["id"]
+ last_activity = storage.get_last_activity()
sum_time = {}
rowcount = 1
@@ -118,7 +118,7 @@
end_time = fact["end_time"]
# ongoing task in current day
- if not end_time and fact["id"] == last_activity_id:
+ if not end_time and last_activity and fact["id"] == last_activity["id"]:
end_time = dt.datetime.now()
end_time_str = ""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]