[Del] remove unnecessary try...catch
This commit is contained in:
parent
0d1a536b23
commit
af94e1e186
@ -257,13 +257,10 @@ class RestClient(object):
|
|||||||
)
|
)
|
||||||
request.response = response
|
request.response = response
|
||||||
status_code = response.status_code
|
status_code = response.status_code
|
||||||
if status_code // 100 == 2: # 2xx都算成功,尽管交易所都用200
|
if status_code // 100 == 2: # 2xx codes are all successful
|
||||||
try:
|
json_body = response.json()
|
||||||
jsonBody = response.json()
|
request.callback(json_body, request)
|
||||||
request.callback(jsonBody, request)
|
|
||||||
request.status = RequestStatus.success
|
request.status = RequestStatus.success
|
||||||
except:
|
|
||||||
print("not json body from request, check body: ",response.text)
|
|
||||||
else:
|
else:
|
||||||
request.status = RequestStatus.failed
|
request.status = RequestStatus.failed
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user