Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Commit

Permalink
Add check to make sure speak message has metadata
Browse files Browse the repository at this point in the history
This can occur if a custom made speak message is injected and VK should
handle malformed speak messages.
  • Loading branch information
forslund committed Jan 10, 2021
1 parent 35fd035 commit 83ed811
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/integrationtests/voight_kampff/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def mycroft_responses(context):
responses = 'Mycroft responded with:\n'
for m in messages:
responses += 'Mycroft: '
if 'dialog' in m.data['meta']:
if 'meta' in m.data and 'dialog' in m.data['meta']:
responses += '{}.dialog'.format(m.data['meta']['dialog'])
responses += '({})\n'.format(m.data['meta'].get('skill'))
responses += '"{}"\n'.format(m.data['utterance'])
Expand Down

0 comments on commit 83ed811

Please sign in to comment.