diff options
author | Tobias Brox <tobias@redpill-linpro.com> | 2020-06-06 16:38:07 +0200 |
---|---|---|
committer | Tobias Brox <tobias@redpill-linpro.com> | 2020-06-06 16:38:07 +0200 |
commit | 956aafed988ce1ec6d07ba3478f2c2b714f011c6 (patch) | |
tree | c7df70e006f39a9ac7bb7b34bfbdc07b4327665a | |
parent | f1945151631e17304880255d2020c9bee1973e73 (diff) | |
download | calendar-cli-956aafed988ce1ec6d07ba3478f2c2b714f011c6.zip |
removed a duplicated code line, fixed a python3-unicode/byte-bug
-rwxr-xr-x | calendar-cli.py | 3 |
1 files changed, 1 insertions, 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'): |