Merge pull request #66 from KsaRedFx/patch-1

Fixed bug in weather.py
This commit is contained in:
Luke Rogers 2013-06-18 03:19:38 -07:00
commit 9f5fc95d5b

View file

@ -35,10 +35,13 @@ def get_weather(location):
data['wind']['text'] = 'N'
# visibility and pressure conversions
try:
data['atmosphere']['visibility_km'] = \
int(round(float(data['atmosphere']['visibility']) * 1.609344))
data['atmosphere']['visibility_km'] = \
str(round((float(data['atmosphere']['visibility']) * 33.8637526), 2))
except:
data['atmosphere']['visibility_km'] = "ERR"
# textual value for air pressure
rising = data['atmosphere']['rising']