summaryrefslogtreecommitdiff
path: root/calendar-cli.py
diff options
context:
space:
mode:
authorTobias Brox <t@tobixen.no>2015-04-23 22:44:36 +0200
committerTobias Brox <t@tobixen.no>2015-04-23 22:44:36 +0200
commit95d257e58e069c6aa3d989db47745e1ebd4f4a59 (patch)
treed959cc7d4d95230767f091ee84577c1679acea5f /calendar-cli.py
parent6f4c57bf8be53c7ab16ba38fc1bb64735aa9f6a7 (diff)
downloadcalendar-cli-95d257e58e069c6aa3d989db47745e1ebd4f4a59.zip
bugfix
Diffstat (limited to 'calendar-cli.py')
-rwxr-xr-xcalendar-cli.py2
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']))