Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Nov 19, 2021
1 parent defe41b commit 2070014
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions ovos_workshop/skills/ovos.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import time
from copy import deepcopy
from os.path import join, dirname, isfile
from os.path import join

from ovos_utils import camel_case_split, get_handler_name
# ensure mycroft can be imported
Expand Down Expand Up @@ -204,11 +204,8 @@ def on_end(message):
"""Store settings and indicate that the skill handler has completed
"""
if self.settings != self._initial_settings:
try: # ovos-core
self.settings.store()
except: # mycroft-core
save_settings(self.settings_write_path, self.settings)
self._initial_settings = dict(self.settings)
save_settings(self.settings_write_path, self.settings)
self._initial_settings = deepcopy(self.settings)
if handler_info:
msg_type = handler_info + '.complete'
message.context["skill_id"] = self.skill_id
Expand Down Expand Up @@ -340,15 +337,15 @@ def _real_wait_response(self, is_cancel, validator, on_fail, num_retries):
class OVOSFallbackSkill(FallbackSkill, OVOSSkill):
""" monkey patched mycroft fallback skill """

def register_decorated(self):
def _register_decorated(self):
"""Register all intent handlers that are decorated with an intent.
Looks for all functions that have been marked by a decorator
and read the intent data from them. The intent handlers aren't the
only decorators used. Skip properties as calling getattr on them
executes the code which may have unintended side-effects
"""
super().register_decorated()
super()._register_decorated()
for attr_name in get_non_properties(self):
method = getattr(self, attr_name)
if hasattr(method, 'fallback_priority'):
Expand Down

0 comments on commit 2070014

Please sign in to comment.