Fix crash when retrieving weather data

This commit is contained in:
2019-09-27 07:12:19 +02:00
parent 20f2586565
commit 7da8720566

View File

@ -105,7 +105,7 @@ class WeatherToFreemobile():
break
return_message.append(" - {:2d}h : {}mm".format(
weather_date.hour,
round(float(weather.get_rain()['3h']),1)
round(float(weather.get_rain().get('3h',0)),1)
))
return "\n".join(return_message)