Merge pull request #667 from croneter/pr-keyError

Fix keyError 'sessionKey' for weird PMS messages
This commit is contained in:
croneter 2019-02-02 13:39:31 +01:00 committed by GitHub
commit 06fe382a3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -256,6 +256,9 @@ def process_playing(data):
skip = True skip = True
if skip: if skip:
continue continue
if 'sessionKey' not in message:
LOG.warn('Received malformed message from the PMS: %s', message)
continue
session_key = message['sessionKey'] session_key = message['sessionKey']
# Do we already have a sessionKey stored? # Do we already have a sessionKey stored?
if session_key not in PLAYSTATE_SESSIONS: if session_key not in PLAYSTATE_SESSIONS: