From 88b502975957a944a033fd7725aabc2e74a464b2 Mon Sep 17 00:00:00 2001 From: cos Date: Sun, 8 May 2022 11:29:34 +0200 Subject: Make workaround cope with perpetually repeated events --- calendar-cli.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/calendar-cli.py b/calendar-cli.py index cec2e4d..933e330 100755 --- a/calendar-cli.py +++ b/calendar-cli.py @@ -558,6 +558,8 @@ def calendar_agenda(caldav_conn, args): rrule = rrulestr(event.rrule.value, dtstart=event.dtstart.value, tzids=tzinfo) dtstart_generator = rrule.xafter(search_dtstart) for instance_dtstart in dtstart_generator: + if instance_dtstart > search_dtend: + break repeated_events_ = find_calendar(caldav_conn, args).date_search(instance_dtstart, search_dtend, expand=True) for event_cal_ in repeated_events_: repeated_events__ = event_cal_.instance.components() -- cgit v1.2.3