fix: replace bare except clauses with typed except (ValueError, AttributeError) in calendar_sync_event_step

This commit is contained in:
bsiggel
2026-03-31 07:11:39 +00:00
parent 6595a50561
commit 00e95b7526

View File

@@ -340,13 +340,13 @@ def adjust_times(start_dt, end_dt, data):
try:
vorb_h, vorb_m, vorb_s = map(int, vorbereitungs_dauer.split(':'))
vorbereitung_td = timedelta(hours=vorb_h, minutes=vorb_m, seconds=vorb_s)
except:
except (ValueError, AttributeError):
vorbereitung_td = timedelta(0)
try:
fahrt_h, fahrt_m, fahrt_s = map(int, fahrzeit.split(':'))
fahrt_td = timedelta(hours=fahrt_h, minutes=fahrt_m, seconds=fahrt_s)
except:
except (ValueError, AttributeError):
fahrt_td = timedelta(0)
hinfahrt_td = timedelta(0)