From 2aaf80c393721709c58bdb036d2e5a52b086aac5 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Wed, 8 May 2024 14:28:26 -0700 Subject: [PATCH] Remove old patch (#522) * Deprecate patched `add_event` method for latest ovos-workshop compat. * Fix accidental changes --------- Co-authored-by: Daniel McKnight --- neon_utils/skills/neon_skill.py | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/neon_utils/skills/neon_skill.py b/neon_utils/skills/neon_skill.py index 1ea556c6..332f6b02 100644 --- a/neon_utils/skills/neon_skill.py +++ b/neon_utils/skills/neon_skill.py @@ -75,6 +75,7 @@ DEFAULT_SPEED_MODE = "thoughtful" CACHE_TIME_OFFSET = 24*60*60 # seconds in 24 hours + @deprecated("deprecated without replacement, skill settings no longer shipped in skill folder", "2.0.0") def save_settings(skill_dir, skill_settings): """Save skill settings to file.""" @@ -893,22 +894,3 @@ def init_dialog(self, root_directory: Optional[str] = None): """ log_deprecation("Use `load_dialog_files`", "2.0.0") self.load_dialog_files(root_directory) - - def add_event(self, name: str, handler: callable, - handler_info: Optional[str] = None, once: bool = False, - speak_errors: bool = True): - # TODO: Remove with ovos-workshop==0.0.13 - try: - # Patching FakeBus compat. with MessageBusClient - if hasattr(self.bus, "ee"): - emitter = self.bus.ee - else: - emitter = self.bus.emitter - if handler_info == "mycroft.skill.handler" and \ - emitter.listeners(name): - LOG.warning(f"Not re-registering intent handler {name}") - return - except Exception as e: - LOG.exception(e) - OVOSSkill.add_event(self, name, handler, handler_info, once, - speak_errors)