From c9c1990ea172133f22038c58e6ca2f6978fea44a Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Wed, 10 Jul 2024 16:40:56 -0700 Subject: [PATCH] Update locationdata.py --- modules/locationdata.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/locationdata.py b/modules/locationdata.py index 975516a..64a46c1 100644 --- a/modules/locationdata.py +++ b/modules/locationdata.py @@ -256,13 +256,14 @@ def getActiveWeatherAlertsDetail(lat=0, lon=0): # trim the alerts to the first ALERT_COUNT alerts = alerts.split("\n***\n")[:ALERT_COUNT] - - if alerts == "" or alerts == None: + + if alerts == "" or alerts == ['']: return "No weather alerts found" # trim off last newline if alerts[-1] == "\n": alerts = alerts[:-1] - # return the first ALERT_COUNT alerts + alerts = "\n".join(alerts) + return alerts \ No newline at end of file