Merge pull request #1469 from croneter/py2-fix-dict

Fix Alexa and RuntimeError: dictionary keys changed during iteration
This commit is contained in:
croneter 2021-05-14 09:18:32 +02:00 committed by GitHub
commit 29822db781
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ def convert_alexa_to_companion(dictionary):
"""
The params passed by Alexa must first be converted to Companion talk
"""
for key in dictionary:
for key in list(dictionary):
if key in v.ALEXA_TO_COMPANION:
dictionary[v.ALEXA_TO_COMPANION[key]] = dictionary[key]
del dictionary[key]