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