Skip to content

Commit

Permalink
its a bug hunt
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Nov 14, 2024
1 parent 3c62f11 commit 31fa80a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ovos_workshop/skills/ovos.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,7 @@ def register_resting_screen(self):
handler = getattr(self, attr_name)
if hasattr(handler, 'resting_handler'):
resting_name = handler.resting_handler
LOG.debug(f"{get_handler_name(handler)} is a resting screen, name: {resting_name}")

def register(message=None):
self.log.info(f'Registering resting screen {resting_name} for {self.skill_id}.')
Expand All @@ -953,10 +954,10 @@ def register(message=None):

self.add_event("homescreen.manager.reload.list", register, speak_errors=False)

def wrapper(message):
LOG.debug(f"resting_handler: {attr_name} - {resting_name} - {get_handler_name(handler)}")
def wrapper(message, cb=handler):
LOG.debug(f"resting_handler: {attr_name} - {resting_name} - {get_handler_name(cb)}")
if message.data["homescreen_id"] == self.skill_id:
handler(message)
cb(message)

self.add_event("homescreen.manager.activate.display", wrapper, speak_errors=False)

Expand Down

0 comments on commit 31fa80a

Please sign in to comment.