mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-07-05 17:32:02 +02:00
fixDataReturn
This commit is contained in:
@@ -121,7 +121,9 @@ def get_weather(lat=0, lon=0, unit=0):
|
||||
weather = weather[:-1]
|
||||
|
||||
# get any alerts and return the count
|
||||
alert, alert_num = getWeatherAlerts(lat, lon)
|
||||
alerts = getWeatherAlerts(lat, lon)
|
||||
alert = alerts[0]
|
||||
alert_num = alerts[1]
|
||||
if alert_num > 0:
|
||||
# add the alert count warning to the weather
|
||||
weather = str(alert_num) + " local alerts!\n" + weather + "\n" + alert
|
||||
@@ -210,7 +212,8 @@ def getWeatherAlerts(lat=0, lon=0):
|
||||
alerts = abbreviate_weather(alerts)
|
||||
|
||||
# return the first ALERT_COUNT alerts
|
||||
return "\n".join(alerts.split("\n")[:ALERT_COUNT]), alert_num
|
||||
data = "\n".join(alerts.split("\n")[:ALERT_COUNT]), alert_num
|
||||
return data
|
||||
|
||||
def getActiveWeatherAlertsDetail(lat=0, lon=0):
|
||||
# get the latest details of weather alerts from NOAA
|
||||
|
||||
Reference in New Issue
Block a user