third dahua xunxi speaker 优化

This commit is contained in:
caoqianming 2022-12-24 14:10:22 +08:00
parent ceb86617e2
commit 7e3a1f4f78
3 changed files with 4 additions and 4 deletions

View File

@ -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):
"""

View File

@ -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):
"""播放报警声

View File

@ -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):
"""