1
0
mirror of https://github.com/no2chem/wideq.git synced 2025-05-16 07:10:09 -07:00

fix flake8 criteria

This commit is contained in:
pifou 2020-10-13 23:08:39 +02:00
parent 810a3ce747
commit c6f822bffe
2 changed files with 2 additions and 1 deletions

View File

@ -440,7 +440,7 @@ class Device(object):
try: try:
# malformed JSON may contains unwanted [bracket] # malformed JSON may contains unwanted [bracket]
LOGGER.debug('attempting to fix JSON format') LOGGER.debug('attempting to fix JSON format')
return json.loads( re.sub(r'^\{(.*?)\}$', r'\1', data)) return json.loads(re.sub(r'^\{(.*?)\}$', r'\1', data))
except json.decoder.JSONDecodeError: except json.decoder.JSONDecodeError:
raise core.JsonError(self.device.id, data) raise core.JsonError(self.device.id, data)

View File

@ -168,6 +168,7 @@ class MonitorError(APIError):
self.device_id = device_id self.device_id = device_id
self.code = code self.code = code
class JsonError(APIError): class JsonError(APIError):
"""JSON Decode error """JSON Decode error
The received json value is malformed The received json value is malformed