diff --git a/aprsd/plugins/location.py b/aprsd/plugins/location.py index fd667ef..50a6de2 100644 --- a/aprsd/plugins/location.py +++ b/aprsd/plugins/location.py @@ -65,6 +65,10 @@ class LocationPlugin(plugin.APRSDPluginBase): LOG.error("Couldn't fetch forecast.weather.gov '{}'".format(ex)) wx_data = {"location": {"areaDescription": "Unknown Location"}} + if "location" not in wx_data: + LOG.error("Couldn't fetch forecast.weather.gov '{}'".format(wx_data)) + wx_data = {"location": {"areaDescription": "Unknown Location"}} + reply = "{}: {} {}' {},{} {}h ago".format( searchcall, wx_data["location"]["areaDescription"],