Fixed misplaced parentheses for rounding windspeed, abbreviated 'miles/h' to 'mph', and added space before wind units

This commit is contained in:
sapostoluk 2021-02-17 00:36:13 -05:00
parent af1e7e05c1
commit ad68387642

View File

@ -442,11 +442,11 @@ class Weather(inkycal_module):
if self.units == 'metric':
logging.debug('getting windspeed in metric unit')
wind = str(round(weather.wind(unit='meters_sec')['speed']), ndigits=dec_wind) + 'm/s'
wind = str(round(weather.wind(unit='meters_sec')['speed'], ndigits=dec_wind)) + ' m/s'
elif self.units == 'imperial':
logging.debug('getting windspeed in imperial unit')
wind = str(round(weather.wind(unit='miles_hour')['speed']), ndigits=dec_wind) + 'miles/h'
wind = str(round(weather.wind(unit='miles_hour')['speed'], ndigits=dec_wind)) + ' mph'
dec = decimal.Decimal
moonphase = get_moon_phase()