move observation and forecast outside try-except-else

This commit is contained in:
Flamm, Matthew H 2019-08-10 01:33:43 +01:00
parent 1d39d864fa
commit 53b78b3283

View file

@ -224,8 +224,8 @@ class NWSWeather(WeatherEntity):
self.nws.station,
status,
)
else:
self.observation = self.nws.observation
_LOGGER.debug("Updating forecast")
try:
await self.nws.update_forecast()
@ -233,7 +233,6 @@ class NWSWeather(WeatherEntity):
_LOGGER.error(
"Error updating forecast from station %s: %s", self.nws.station, status
)
else:
self._forecast = self.nws.forecast
@property