🐛 Preventing error in case of a misbehaving dateutil / timezone

This commit is contained in:
Patrick Müller 2021-03-01 19:16:22 +01:00
parent 0f17defb11
commit 91e83b05f6

View File

@ -27,7 +27,7 @@ def crawl():
end=datetime.strptime((datetime.now() + timedelta(days=365)).strftime('%Y-%m-%d'), '%Y-%m-%d')) end=datetime.strptime((datetime.now() + timedelta(days=365)).strftime('%Y-%m-%d'), '%Y-%m-%d'))
except ValueError as error: except ValueError as error:
# Value error sometimes happens because of a problem with dateutil and timezones # Value error sometimes happens because of a problem with dateutil and timezones
print("Error fetching ical events. Terminating." + error) print("Error fetching ical events. Terminating." + str(error))
exit(1) exit(1)
# ______ __ __ __ __ __ __ ____ _____ ____ __ # ______ __ __ __ __ __ __ ____ _____ ____ __