third dahua xunxi speaker 优化
This commit is contained in:
parent
ceb86617e2
commit
7e3a1f4f78
|
@ -89,7 +89,7 @@ class DhClient:
|
|||
self.handle_log(result='error', response=None)
|
||||
if raise_exception:
|
||||
raise APIException(**DH_REQUEST_ERROR)
|
||||
return 'error', DH_REQUEST_ERROR
|
||||
return 'error', DH_REQUEST_ERROR
|
||||
|
||||
def _get_response_ms(self):
|
||||
"""
|
||||
|
|
|
@ -81,10 +81,10 @@ class SpClient:
|
|||
# self.handle_log(result='success', response=ret)
|
||||
return 'success', ret
|
||||
except RequestException:
|
||||
self.handle_log(result='error', response=ret)
|
||||
self.handle_log(result='error', response=None)
|
||||
if raise_exception:
|
||||
raise APIException(**SP_REQUEST_ERROR)
|
||||
return 'error', SP_REQUEST_ERROR
|
||||
return 'error', SP_REQUEST_ERROR
|
||||
|
||||
def speak(self, path: str, sns: list, v_num: int):
|
||||
"""播放报警声
|
||||
|
|
|
@ -77,7 +77,7 @@ class XxClient:
|
|||
self.handle_log(result='error', response=None)
|
||||
if raise_exception:
|
||||
raise APIException(**XX_REQUEST_ERROR)
|
||||
return 'error', XX_REQUEST_ERROR
|
||||
return 'error', XX_REQUEST_ERROR
|
||||
|
||||
def _get_response_ms(self):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue