Skip to content

Commit 09d5f26

Browse files
708yamaguchiknorth55
authored andcommitted
Add description why we use integer for temperature, humidity and wind speed
1 parent 4cc90fb commit 09d5f26

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

jsk_fetch_robot/jsk_fetch_startup/scripts/time_signal.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ def _get_weather_forecast(self, lang='en'):
108108
url = 'http://api.openweathermap.org/data/2.5/weather?q=tokyo&lang={}&units=metric&appid={}'.format(lang, self.appid) # NOQA
109109
resp = json.loads(urllib2.urlopen(url).read())
110110
weather = resp['weather'][0]['description']
111+
# aques_talk replaces decimal point to "。" (e.g. 7.8度 -> 7。8ど)
112+
# So we use integer for temperature, humidity and wind speed.
111113
temp = int(resp['main']['temp'])
112114
humidity = int(resp['main']['humidity'])
113115
wind_speed = int(resp['wind']['speed'])

0 commit comments

Comments
 (0)