浏览代码

Merge remote-tracking branch 'remotes/origin/locky' into test

Ansjer 1 年之前
父节点
当前提交
f8476b3ae9
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Object/IPWeatherObject.py

+ 2 - 2
Object/IPWeatherObject.py

@@ -232,6 +232,6 @@ class OpenWeatherMap:
         res_data = eval(res.text)
         if res_data['cod'] != 200:
             return None, None
-        temp = int(res_data['main']['temp'])
-        humidity = int(res_data['main']['humidity'])
+        temp = str(int(res_data['main']['temp']))
+        humidity = str(int(res_data['main']['humidity']))
         return temp, humidity