Allow multiple VTIMEZONE

This commit is contained in:
Gabriel Augendre 2016-09-19 00:38:04 +02:00
parent 2bfbb4c7ed
commit 16430f29be
No known key found for this signature in database
GPG Key ID: D2B6A5B41FC438B1
1 changed files with 3 additions and 2 deletions

5
app.py
View File

@ -40,8 +40,9 @@ def hello():
for k, v in cal.items():
other.add(k, v)
# Copy the VTIMEZONE component
other.add_component(cal.walk('VTIMEZONE')[0])
# Copy VTIMEZONE components
for ev in cal.walk('VTIMEZONE'):
other.add_component(ev)
# Filter and copy VEVENTs
for ev in cal.walk('VEVENT'):