summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Brox <tobias@redpill-linpro.com>2019-09-18 11:45:53 +0000
committerTobias Brox <tobias@redpill-linpro.com>2019-09-18 11:45:53 +0000
commit5e383776ffc11c6b0aa2ead7075d9b2aa8bd4775 (patch)
treeadde9d8bf683f170bfa9a2c394302095e92adc6d
parent420348e74d01e3ca8093c62bc8079cb20b5a3ccb (diff)
downloadcalendar-cli-5e383776ffc11c6b0aa2ead7075d9b2aa8bd4775.zip
usually it's better with too many comments than too few
-rwxr-xr-xcalendar-cli.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/calendar-cli.py b/calendar-cli.py
index b9e5aaf..36b5ec6 100755
--- a/calendar-cli.py
+++ b/calendar-cli.py
@@ -500,6 +500,8 @@ def calendar_agenda(caldav_conn, args):
if not dtstart.tzinfo:
dtstart = _tz(args).localize(dtstart)
events.append({'dtstart': dtstart, 'instance': event})
+ ## changed to use the "key"-parameter at 2019-09-18, as needed for python3.
+ ## this will probably cause regression on sufficiently old versions of python
events.sort(key=lambda a: a['dtstart'])
for event in events:
event['summary'] = "(no description)"