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")
|
||||
|
||||
def initialize(self):
|
||||
def handler(intent):
|
||||
return lambda message: self.generic_handler(intent, message)
|
||||
for key in self.questions:
|
||||
self.register_intent(
|
||||
f"{key}.intent",
|
||||
lambda y: self.generic_handler(key, y)
|
||||
)
|
||||
self.register_intent(f"{key}.intent", handler(key))
|
||||
|
||||
def generic_handler(self, intent_id, message):
|
||||
title = self.questions[intent_id]["title"]
|
||||
|
|
Loading…
Reference in New Issue