fixed: M option for one-line mode (#174)
This commit is contained in:
parent
a688296aee
commit
df46123b7f
1 changed files with 4 additions and 1 deletions
|
|
@ -89,7 +89,10 @@ def render_wind(data, query):
|
||||||
else:
|
else:
|
||||||
wind_direction = ""
|
wind_direction = ""
|
||||||
|
|
||||||
if query.get('use_imperial', False):
|
if query.get('use_ms_for_wind', False):
|
||||||
|
unit = ' m/s'
|
||||||
|
wind = u'%s%.1f%s' % (wind_direction, float(data['windspeedKmph'])/36.0*10.0, unit)
|
||||||
|
elif query.get('use_imperial', False):
|
||||||
unit = ' mph'
|
unit = ' mph'
|
||||||
wind = u'%s%s%s' % (wind_direction, data['windspeedMiles'], unit)
|
wind = u'%s%s%s' % (wind_direction, data['windspeedMiles'], unit)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue