From 956aafed988ce1ec6d07ba3478f2c2b714f011c6 Mon Sep 17 00:00:00 2001 From: Tobias Brox Date: Sat, 6 Jun 2020 16:38:07 +0200 Subject: removed a duplicated code line, fixed a python3-unicode/byte-bug --- calendar-cli.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/calendar-cli.py b/calendar-cli.py index 9b6ab68..e62d44e 100755 --- a/calendar-cli.py +++ b/calendar-cli.py @@ -347,7 +347,6 @@ def calendar_add(caldav_conn, args): if event_spec[1][-1:] != 'd': raise ValueError('Duration of whole-day event must be multiple of 1d') duration = int(event_spec[1][:-1]) - dtstart = dateutil.parser.parse(event_spec[0]) dtend = dtstart + timedelta(days=duration) event.add('dtstart', _date(dtstart.date())) event.add('dtend', _date(dtend.date())) @@ -478,7 +477,7 @@ def calendar_agenda(caldav_conn, args): events = [] if args.icalendar: for ical in events_: - print(ical.data).encode('utf-8').strip() + print(to_normal_str(ical.data).strip()) else: for event_cal in events_: if hasattr(event_cal.instance, 'vtimezone'): -- cgit v1.2.3