More specific exception handling
This commit is contained in:
parent
da4be6d7e4
commit
3ada7d1a98
1 changed files with 3 additions and 3 deletions
|
@ -190,9 +190,9 @@ class PMS_Websocket(WebSocket):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
message = loads(message)
|
message = loads(message)
|
||||||
except Exception as ex:
|
except ValueError:
|
||||||
log.error('%s: Error decoding message from websocket: %s'
|
log.error('%s: Error decoding message from websocket'
|
||||||
% (self.__class__.__name__, ex))
|
% self.__class__.__name__)
|
||||||
log.error(message)
|
log.error(message)
|
||||||
return False
|
return False
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue