Fix pylint issue (#8325)

This commit is contained in:
Fabian Affolter 2017-07-03 22:02:43 +02:00 committed by GitHub
parent 8d940fb585
commit 1e655eea74

View file

@ -86,13 +86,13 @@ class IntentHandler(object):
try: try:
response = json.loads(payload) response = json.loads(payload)
except TypeError: except TypeError:
LOGGER.error('Received invalid JSON: %s', payload) LOGGER.error("Received invalid JSON: %s", payload)
return return
try: try:
response = INTENT_SCHEMA(response) response = INTENT_SCHEMA(response)
except vol.Invalid as err: except vol.Invalid as err:
LOGGER.error('Intent has invalid schema: %s. %s', err, response) LOGGER.error("Intent has invalid schema: %s. %s", err, response)
return return
intent = response['intent']['intentName'].split('__')[-1] intent = response['intent']['intentName'].split('__')[-1]
@ -108,6 +108,7 @@ class IntentHandler(object):
slots = self.parse_slots(response) slots = self.parse_slots(response)
yield from action.async_run(slots) yield from action.async_run(slots)
# pylint: disable=no-self-use
def parse_slots(self, response): def parse_slots(self, response):
"""Parse the intent slots.""" """Parse the intent slots."""
parameters = {} parameters = {}