Update locationdata.py

This commit is contained in:
SpudGunMan
2024-07-10 16:23:11 -07:00
parent 66d19f13f6
commit 59badb8515
+2 -2
View File
@@ -204,7 +204,7 @@ def getWeatherAlerts(lat=0, lon=0):
i.getElementsByTagName("title")[0].childNodes[0].nodeValue + "\n"
)
if alerts == "":
if alerts == "" or alerts == None:
return "No weather alerts found"
# trim off last newline
@@ -257,7 +257,7 @@ def getActiveWeatherAlertsDetail(lat=0, lon=0):
# trim the alerts to the first ALERT_COUNT
alerts = alerts.split("\n***\n")[:ALERT_COUNT]
if alerts == "":
if alerts == "" or alerts == None:
return "No weather alerts found"
# trim off last newline