Fix silent mycroft when config lacks enclosure/platform

pull/474/head
Åke Forslund 2017-01-23 17:58:47 +01:00
parent b64c4ecfe6
commit a1d7fa79db
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ def handle_speak(event):
#
# TODO: Remove or make an option? This is really a hack, anyway,
# so we likely will want to get rid of this when not running on Mimic
if not config.get('enclosure')['platform'] == "picroft":
if not config.get('enclosure', {}).get('platform') == "picroft":
chunks = re.split(r'(?<!\w\.\w.)(?<![A-Z][a-z]\.)(?<=\.|\?)\s',
utterance)
for chunk in chunks: