added some more error handling

fixed pwm_freq not getting set on init
This commit is contained in:
Giovanni Harting
2015-11-13 23:41:38 +01:00
parent a65bb770fd
commit 6ae2cc4fb8
2 changed files with 10 additions and 10 deletions

View File

@@ -388,7 +388,10 @@ class LedDProtocol(asyncio.Protocol):
except UnicodeDecodeError:
log.warning("Recieved undecodable data, ignoring")
else:
self.select_task(d_decoded)
try:
self.select_task(d_decoded)
except JSONRPCError:
log.warning("Recieved non-json data, ignoring")
def select_task(self, data):
if data: