Fix late binding issue in car-manual-skill
This commit is contained in:
parent
2c682eac44
commit
b78f211ccb
|
@ -35,11 +35,10 @@ class CarManual(MycroftSkill):
|
||||||
dialog_file.write("\n")
|
dialog_file.write("\n")
|
||||||
|
|
||||||
def initialize(self):
|
def initialize(self):
|
||||||
|
def handler(intent):
|
||||||
|
return lambda message: self.generic_handler(intent, message)
|
||||||
for key in self.questions:
|
for key in self.questions:
|
||||||
self.register_intent(
|
self.register_intent(f"{key}.intent", handler(key))
|
||||||
f"{key}.intent",
|
|
||||||
lambda y: self.generic_handler(key, y)
|
|
||||||
)
|
|
||||||
|
|
||||||
def generic_handler(self, intent_id, message):
|
def generic_handler(self, intent_id, message):
|
||||||
title = self.questions[intent_id]["title"]
|
title = self.questions[intent_id]["title"]
|
||||||
|
|
Loading…
Reference in New Issue