mirror of
https://github.com/no2chem/wideq.git
synced 2025-05-15 23:00:18 -07:00
fix flake8 criteria
This commit is contained in:
parent
810a3ce747
commit
c6f822bffe
@ -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)
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user