library/calendar_sync.py aktualisiert
This commit is contained in:
@ -55,17 +55,16 @@ def sync_ics_to_caldav(module):
|
|||||||
for event in target_cal.events():
|
for event in target_cal.events():
|
||||||
if event is None:
|
if event is None:
|
||||||
continue
|
continue
|
||||||
|
data = getattr(event, 'data', None)
|
||||||
|
if not data:
|
||||||
|
continue
|
||||||
try:
|
try:
|
||||||
data = getattr(event, 'data', None)
|
|
||||||
if not data:
|
|
||||||
continue
|
|
||||||
for calendar in vobject.readComponents(data):
|
for calendar in vobject.readComponents(data):
|
||||||
for component in calendar.components():
|
for component in calendar.components():
|
||||||
if component.name == 'VEVENT' and hasattr(component, "uid"):
|
if component.name == 'VEVENT' and hasattr(component, 'uid'):
|
||||||
uid = str(component.uid)
|
uid = str(component.uid)
|
||||||
existing_events[uid] = event
|
existing_events[uid] = event
|
||||||
except Exception:
|
except Exception:
|
||||||
# Fehler beim Parsen eines Events ignorieren
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
changed = False
|
changed = False
|
||||||
@ -116,4 +115,3 @@ def run_module():
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
run_module()
|
run_module()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user