mirror of
https://github.com/home-assistant/core.git
synced 2025-07-11 07:17:12 +00:00
Fix pylint issue (#8325)
This commit is contained in:
parent
8d940fb585
commit
1e655eea74
@ -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 = {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user