Update locationdata.py

This commit is contained in:
SpudGunMan
2024-07-10 16:12:09 -07:00
parent b1d9b896e5
commit 4196769e1e
+6 -1
View File
@@ -123,7 +123,12 @@ def get_weather(lat=0, lon=0, unit=0):
# get any alerts and return the count
alerts = getWeatherAlerts(lat, lon)
alert = alerts[0]
alert_num = int(alerts[1])
if alert == "No weather alerts found":
alert = ""
alert_num = 0
else:
alert_num = alerts[1]
if alert_num > 0:
# add the alert count warning to the weather
weather = str(alert_num) + " local alerts!\n" + weather + "\n" + alert