Assertion for VTIMEZONE sub-components' DTSTART

pull/229/head
Christian Geier 2017-05-26 14:59:54 +02:00
rodzic fa86fd5dfb
commit f94cd35b6b
2 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -14,7 +14,8 @@ New features:
Bug fixes:
- *add item here*
- added an assertion that VTIMEZONE sub-components' DTSTART must be of type
DATETIME [geier]
3.11.4 (2017-05-10)

Wyświetl plik

@ -575,6 +575,9 @@ class Timezone(Component):
for component in self.walk():
if type(component) == Timezone:
continue
assert isinstance(component['DTSTART'].dt, datetime), (
"VTIMEZONEs sub-components' DTSTART must be of type datetime, not date"
)
try:
tzname = str(component['TZNAME'])
except KeyError: