From 5e383776ffc11c6b0aa2ead7075d9b2aa8bd4775 Mon Sep 17 00:00:00 2001 From: Tobias Brox Date: Wed, 18 Sep 2019 11:45:53 +0000 Subject: usually it's better with too many comments than too few --- calendar-cli.py | 2 ++ 1 file changed, 2 insertions(+) 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)" -- cgit v1.2.3