fix
This commit is contained in:
parent
e08ba28075
commit
df40c3bf72
1 changed files with 12 additions and 1 deletions
|
|
@ -45,7 +45,18 @@ def export_calendar(url: str, username: str, password: str, calendar: str) -> Ca
|
||||||
print(f" {len(objects)} objects")
|
print(f" {len(objects)} objects")
|
||||||
|
|
||||||
for obj in objects:
|
for obj in objects:
|
||||||
cal = Calendar.from_ical(obj.data)
|
data = obj.data
|
||||||
|
|
||||||
|
if data is None:
|
||||||
|
print(f" fetching {obj.url}")
|
||||||
|
obj.load()
|
||||||
|
data = obj.data
|
||||||
|
|
||||||
|
if not data:
|
||||||
|
print(f" skipping empty object {obj.url}")
|
||||||
|
continue
|
||||||
|
|
||||||
|
cal = Calendar.from_ical(data)
|
||||||
|
|
||||||
for component in cal.walk():
|
for component in cal.walk():
|
||||||
if component.name != "VCALENDAR":
|
if component.name != "VCALENDAR":
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue