[fix] handle_reponse没有正确处理set_params的响应
处置:判断cmd为set_params时,忽略reponse中的data字段。
This commit is contained in:
parent
9610fbd70c
commit
728eae521f
@ -189,8 +189,15 @@ class ParamsService(QObject):
|
||||
token = response.get("token")
|
||||
if token in self.pending_requests:
|
||||
request = self.pending_requests.pop(token)
|
||||
res_data = ''
|
||||
if request.callback:
|
||||
res_data = response["data"]
|
||||
if response.get('cmd') == "get_params":
|
||||
|
||||
res_data = response["data"]
|
||||
|
||||
if response.get('cmd') == 'set_params':
|
||||
res_data = ''
|
||||
|
||||
res = Response(token, CMD.GET_PARAMS, request.widget, res_data)
|
||||
request.callback(res)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user