summaryrefslogtreecommitdiff
path: root/client/brain.py
diff options
context:
space:
mode:
Diffstat (limited to 'client/brain.py')
-rw-r--r--client/brain.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/client/brain.py b/client/brain.py
index 6daa366..d905853 100644
--- a/client/brain.py
+++ b/client/brain.py
@@ -61,13 +61,15 @@ class Brain(object):
"""
for module in self.modules:
for text in texts:
-
if module.isValid(text):
+ self._logger.debug("'%s' is a valid phrase for module '%s'", text, module.__name__)
try:
module.handle(text, self.mic, self.profile)
- return
except:
self._logger.error('Failed to execute module', exc_info=True)
- self.mic.say(
- "I'm sorry. I had some trouble with that operation. Please try again later.")
+ self.mic.say("I'm sorry. I had some trouble with that operation. Please try again later.")
+ else:
+ self._logger.debug("Handling of phrase '%s' by module '%s' completed", text, module.__name__)
+ finally:
return
+ self._logger.debug("No module was able to handle any of these phrases: %r", texts)