From fdbe42a05a240b781c37be5712f8f6e7a0a7b1fc Mon Sep 17 00:00:00 2001 From: croneter Date: Sat, 2 Feb 2019 10:42:57 +0100 Subject: [PATCH] Fix keyError sessionKey for weird PMS messages --- resources/lib/library_sync/websocket.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/lib/library_sync/websocket.py b/resources/lib/library_sync/websocket.py index bdc1bf98..c302f8d9 100644 --- a/resources/lib/library_sync/websocket.py +++ b/resources/lib/library_sync/websocket.py @@ -256,6 +256,9 @@ def process_playing(data): skip = True if skip: continue + if 'sessionKey' not in message: + LOG.warn('Received malformed message from the PMS: %s', message) + continue session_key = message['sessionKey'] # Do we already have a sessionKey stored? if session_key not in PLAYSTATE_SESSIONS: