添加超时

This commit is contained in:
Jerry Yan 2020-04-12 20:38:13 +08:00
parent b38431bf4c
commit df4c3a34b1

2
api.py
View File

@ -99,6 +99,8 @@ class XiGuaLiveApi:
return None
def postJson(self, url, data, **kwargs):
if "timeout" not in kwargs:
kwargs["timeout"] = 10
try:
p = self.s.post(url, data, **kwargs)
except Exception as e: