TimeType error catching

pull/48/head
Mason10198 2 years ago
parent 3192a63823
commit 195377284d

@ -375,10 +375,16 @@ def get_alerts(countyCodes):
LOGGER.debug("getAlerts: Using effective time for alerting")
time_type_start = "effective"
time_type_end = "expires"
else:
elif timetype_mode == "onset":
LOGGER.debug("getAlerts: Using onset time for alerting")
time_type_start = "onset"
time_type_end = "ends"
else:
LOGGER.error(
"getAlerts: Invalid TimeType specified in config.yaml. Using onset time instead."
)
time_type_start = "onset"
time_type_end = "ends"
for countyCode in countyCodes:
url = "https://api.weather.gov/alerts/active?zone={}".format(countyCode)

Loading…
Cancel
Save

Powered by TurnKey Linux.