Merge pull request #474 from forslund/bugfix/473

Fix silent mycroft when config lacks enclosure/platform
pull/480/head
Steve Penrod 2017-01-23 13:48:57 -08:00 committed by GitHub
commit f9ebb5ef63
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: