mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-08-05 16:32:54 +02:00
Update locationdata.py
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user