feat: 优化cd.py
This commit is contained in:
parent
f7e27c290f
commit
0b4524aa85
|
@ -122,7 +122,17 @@ class JSONRequestHandler(BaseHTTPRequestHandler):
|
||||||
|
|
||||||
res = handle_bytes(resp)
|
res = handle_bytes(resp)
|
||||||
if isinstance(res, str):
|
if isinstance(res, str):
|
||||||
self.error(res)
|
if res == "数据头不正确":
|
||||||
|
sc, resp = connect_and_send()
|
||||||
|
if sc is None or resp is None:
|
||||||
|
return
|
||||||
|
res = handle_bytes(resp)
|
||||||
|
if isinstance(res, str):
|
||||||
|
self.error(res)
|
||||||
|
else:
|
||||||
|
self.ok(res)
|
||||||
|
else:
|
||||||
|
self.error(res)
|
||||||
else:
|
else:
|
||||||
self.ok(res)
|
self.ok(res)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue