diff options
author | Tobias Brox <t@tobixen.no> | 2015-04-23 22:44:36 +0200 |
---|---|---|
committer | Tobias Brox <t@tobixen.no> | 2015-04-23 22:44:36 +0200 |
commit | 95d257e58e069c6aa3d989db47745e1ebd4f4a59 (patch) | |
tree | d959cc7d4d95230767f091ee84577c1679acea5f | |
parent | 6f4c57bf8be53c7ab16ba38fc1bb64735aa9f6a7 (diff) | |
download | calendar-cli-95d257e58e069c6aa3d989db47745e1ebd4f4a59.zip |
bugfix
-rwxr-xr-x | calendar-cli.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/calendar-cli.py b/calendar-cli.py index e8db88a..98fc79d 100755 --- a/calendar-cli.py +++ b/calendar-cli.py @@ -285,7 +285,7 @@ def calendar_agenda(caldav_conn, args): for event_cal in events_: for event in event_cal.instance.components(): dtstart = event.dtstart.value - if not dtstart.tzinfo: + if not hasattr(dtstart, 'tzinfo') or not dtstart.tzinfo: dtstart = args.timezone.localize(dtstart) events.append({'dtstart': dtstart, 'instance': event}) events.sort(lambda a,b: cmp(a['dtstart'], b['dtstart'])) |