From b854ae80d784d4ee9a46c6c28c99c1761eac9a9e Mon Sep 17 00:00:00 2001 From: midas Date: Sat, 12 Jul 2025 08:46:06 +0000 Subject: [PATCH] library/calendar_sync.py aktualisiert --- library/calendar_sync.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/library/calendar_sync.py b/library/calendar_sync.py index 868a1e9..705134e 100644 --- a/library/calendar_sync.py +++ b/library/calendar_sync.py @@ -55,17 +55,16 @@ def sync_ics_to_caldav(module): for event in target_cal.events(): if event is None: continue + data = getattr(event, 'data', None) + if not data: + continue try: - data = getattr(event, 'data', None) - if not data: - continue for calendar in vobject.readComponents(data): 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) existing_events[uid] = event except Exception: - # Fehler beim Parsen eines Events ignorieren continue changed = False @@ -116,4 +115,3 @@ def run_module(): if __name__ == '__main__': run_module() -