From 59badb8515394df8fa264d4bf43178c7fa534e3b Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Wed, 10 Jul 2024 16:23:11 -0700 Subject: [PATCH] Update locationdata.py --- modules/locationdata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/locationdata.py b/modules/locationdata.py index e0affd3..975516a 100644 --- a/modules/locationdata.py +++ b/modules/locationdata.py @@ -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