Skip to content

Commit

Permalink
fix(icalendar): support icalendar v6
Browse files Browse the repository at this point in the history
Enable backwards-compatible mode in icalendar v6 so that we can also
continue supporting older versions, which are still in use im
non-bleeding-edge distros.
  • Loading branch information
languitar committed Oct 13, 2024
1 parent 688dbc3 commit 49bc89f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/autosuspend/checks/ical.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
from ..util.datetime import is_aware, to_tz_unaware


# Make v6 behave as if it were an older version to support a wider range.
with suppress(AttributeError):
icalendar.use_pytz()


@dataclass
class CalendarEvent:
summary: str
Expand Down

0 comments on commit 49bc89f

Please sign in to comment.