mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-06-26 21:11:16 +02:00
wxAlert
for localization
This commit is contained in:
@@ -131,7 +131,7 @@ def get_weather(lat=0, lon=0, unit=0):
|
||||
# get any alerts and return the count
|
||||
alerts = getWeatherAlerts(lat, lon)
|
||||
|
||||
if alerts == ERROR_FETCHING_DATA or alerts == NO_DATA_NOGPS:
|
||||
if alerts == ERROR_FETCHING_DATA or alerts == NO_DATA_NOGPS or alerts == NO_ALERTS:
|
||||
alert = ""
|
||||
alert_num = 0
|
||||
else:
|
||||
@@ -213,7 +213,7 @@ def getWeatherAlerts(lat=0, lon=0):
|
||||
)
|
||||
|
||||
if alerts == "" or alerts == None:
|
||||
return "No weather alerts found."
|
||||
return NO_ALERTS
|
||||
|
||||
# trim off last newline
|
||||
if alerts[-1] == "\n":
|
||||
|
||||
@@ -5,6 +5,7 @@ NO_DATA_NOGPS = "No location data: does your device have GPS?"
|
||||
ERROR_FETCHING_DATA = "error fetching data"
|
||||
WELCOME_MSG = 'MeshBot, here for you like a friend who is not. Try sending: ping @foo or, cmd'
|
||||
MOTD = 'Thanks for using MeshBOT! Have a good day!'
|
||||
NO_ALERTS = "No weather alerts found."
|
||||
|
||||
# setup the global variables
|
||||
MESSAGE_CHUNK_SIZE = 160 # message chunk size for sending at high success rate
|
||||
|
||||
Reference in New Issue
Block a user