Fixed stability issue

This commit is contained in:
Maximilian Giller 2019-05-15 19:13:09 +02:00
parent 1a62d9d929
commit aa34b8bc4f

View file

@ -31,7 +31,9 @@ class WeatherColumnDesign (DesignEntity):
temperature = forecast.air_temperature + " " + self.__get_unit__(("°C", "°F")) temperature = forecast.air_temperature + " " + self.__get_unit__(("°C", "°F"))
humidity = forecast.air_humidity + "%" humidity = forecast.air_humidity + "%"
if self.forecast.units== "aviation": if self.forecast.units== "aviation":
if len(forecast.wind_deg)==1: if cur_weather.wind_deg == None:
cur_weather.wind_deg = ""
elif len(forecast.wind_deg)==1:
forecast.wind_deg = "00" + forecast.wind_deg forecast.wind_deg = "00" + forecast.wind_deg
elif len(forecast.wind_deg)==2: elif len(forecast.wind_deg)==2:
forecast.wind_deg = "0" + forecast.wind_deg forecast.wind_deg = "0" + forecast.wind_deg