hamster-applet r458 - trunk/hamster
- From: tbaugis svn gnome org
- To: svn-commits-list gnome org
- Subject: hamster-applet r458 - trunk/hamster
- Date: Mon, 1 Sep 2008 13:24:09 +0000 (UTC)
Author: tbaugis
Date: Mon Sep 1 13:24:09 2008
New Revision: 458
URL: http://svn.gnome.org/viewvc/hamster-applet?rev=458&view=rev
Log:
Changed <action> if <condition> else <alternative action>
expressions that were introduced in python 2.5 to the good old
way of doing things.
Bug 548914 - hamster should be able to work with python 2.4
Modified:
trunk/hamster/reports.py
Modified: trunk/hamster/reports.py
==============================================================================
--- trunk/hamster/reports.py (original)
+++ trunk/hamster/reports.py Mon Sep 1 13:24:09 2008
@@ -93,8 +93,13 @@
delta = end_time - fact["start_time"]
duration = 24 * delta.days + delta.seconds / 60
- end_time_str = end_time.strftime('%H:%M') if end_time else ""
+ end_time_str = ""
+ if end_time:
+ end_time_str = end_time.strftime('%H:%M')
+ category = ""
+ if fact["category"] != _("Unsorted"): #do not print "unsorted"
+ category = fact["category"]
report.write("""<tr>
<td>%s</td>
@@ -105,7 +110,7 @@
<td>%s</td>
</tr>""" % (fact["start_time"].strftime("%d.%m.%y"),
fact["name"],
- fact["category"] if fact["category"] != _("Unsorted") else "", #do not print unsorted
+ category,
fact["start_time"].strftime('%H:%M'),
end_time_str,
stuff.format_duration(duration)))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]