fix: replace bare except clauses with typed except (ValueError, AttributeError) in calendar_sync_event_step
This commit is contained in:
@@ -340,13 +340,13 @@ def adjust_times(start_dt, end_dt, data):
|
|||||||
try:
|
try:
|
||||||
vorb_h, vorb_m, vorb_s = map(int, vorbereitungs_dauer.split(':'))
|
vorb_h, vorb_m, vorb_s = map(int, vorbereitungs_dauer.split(':'))
|
||||||
vorbereitung_td = timedelta(hours=vorb_h, minutes=vorb_m, seconds=vorb_s)
|
vorbereitung_td = timedelta(hours=vorb_h, minutes=vorb_m, seconds=vorb_s)
|
||||||
except:
|
except (ValueError, AttributeError):
|
||||||
vorbereitung_td = timedelta(0)
|
vorbereitung_td = timedelta(0)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
fahrt_h, fahrt_m, fahrt_s = map(int, fahrzeit.split(':'))
|
fahrt_h, fahrt_m, fahrt_s = map(int, fahrzeit.split(':'))
|
||||||
fahrt_td = timedelta(hours=fahrt_h, minutes=fahrt_m, seconds=fahrt_s)
|
fahrt_td = timedelta(hours=fahrt_h, minutes=fahrt_m, seconds=fahrt_s)
|
||||||
except:
|
except (ValueError, AttributeError):
|
||||||
fahrt_td = timedelta(0)
|
fahrt_td = timedelta(0)
|
||||||
|
|
||||||
hinfahrt_td = timedelta(0)
|
hinfahrt_td = timedelta(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user