From c7d2335a02c29b6fa2fe45fa8b7a8087f319ddfd Mon Sep 17 00:00:00 2001 From: Nicco Kunzmann Date: Fri, 11 Oct 2024 12:33:41 +0100 Subject: [PATCH] Update src/icalendar/cal.py Co-authored-by: Steve Piercy --- src/icalendar/cal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/icalendar/cal.py b/src/icalendar/cal.py index d9a3ba76..281c6988 100644 --- a/src/icalendar/cal.py +++ b/src/icalendar/cal.py @@ -591,7 +591,7 @@ def _get_start_end_duration(self): if isinstance(start, date) and not isinstance(start, datetime) and duration is not None and duration.seconds != 0: raise InvalidCalendar("When DTSTART is a date, DURATION must be of days or weeks.") if start is not None and end is not None and is_date(start) != is_date(end): - raise InvalidCalendar("DTSTART and DTEND must have the same type.") + raise InvalidCalendar("DTSTART and DTEND must be of the same type, either date or datetime.") return start, end, duration @property