Skip to content
Snippets Groups Projects
Commit 9faab44c authored by jkerdreu's avatar jkerdreu
Browse files

trap json decoder error

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/trunk@2126 b32b6428-25c9-4566-ad07-03861ab6144f
parent 139e3346
Branches
No related tags found
No related merge requests found
......@@ -18,7 +18,10 @@ class AqaraConnector:
def receive(self):
buf = self.nc.receive()
if buf:
try:
return ujson.decode(buf)
except ValueError:
logger.debug('JSON decoder Error %s' % buf)
return None
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment