添加超时
This commit is contained in:
parent
b38431bf4c
commit
df4c3a34b1
2
api.py
2
api.py
@ -99,6 +99,8 @@ class XiGuaLiveApi:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
def postJson(self, url, data, **kwargs):
|
def postJson(self, url, data, **kwargs):
|
||||||
|
if "timeout" not in kwargs:
|
||||||
|
kwargs["timeout"] = 10
|
||||||
try:
|
try:
|
||||||
p = self.s.post(url, data, **kwargs)
|
p = self.s.post(url, data, **kwargs)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Reference in New Issue
Block a user