From fcef45ae77e727da9daa4aed287d885b5fdcfb86 Mon Sep 17 00:00:00 2001 From: James Lu Date: Mon, 25 May 2020 13:56:19 -0700 Subject: [PATCH] NuWeather: fix crash with DarkSky when forecast summary is unavailable --- NuWeather/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NuWeather/plugin.py b/NuWeather/plugin.py index bc41712..b2a2db7 100644 --- a/NuWeather/plugin.py +++ b/NuWeather/plugin.py @@ -490,7 +490,7 @@ class NuWeather(callbacks.Plugin): 'forecast': [{'dayname': self._get_dayname(forecastdata['time'], idx, tz=data['timezone']), 'max': self._format_temp(f=forecastdata.get('temperatureHigh')), 'min': self._format_temp(f=forecastdata.get('temperatureLow')), - 'summary': forecastdata['summary'].rstrip('.')} for idx, forecastdata in enumerate(data['daily']['data'])] + 'summary': forecastdata.get('summary', 'N/A').rstrip('.')} for idx, forecastdata in enumerate(data['daily']['data'])] } def _openweathermap_fetcher(self, location, geobackend=None):