Skip to content

Commit

Permalink
split fix into other PR
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Dec 9, 2024
1 parent 0db6b22 commit 0fb9caa
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions ovos_core/skill_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,7 @@ def load_plugin_skills(self, network=None, internet=None):
LOG.info(f"Consider uninstalling {skill_id} instead of blacklisting it")
continue
if skill_id not in self.plugin_skills and skill_id not in loaded_skill_ids:
skill_loader = self._get_plugin_skill_loader(skill_id, init_bus=False,
skill_class=plug)
skill_loader = self._get_plugin_skill_loader(skill_id, init_bus=False)
requirements = skill_loader.runtime_requirements
if not network and requirements.network_before_load:
continue
Expand All @@ -331,7 +330,7 @@ def _get_internal_skill_bus(self):
bus = self.bus
return bus

def _get_plugin_skill_loader(self, skill_id, init_bus=True, skill_class=None):
def _get_plugin_skill_loader(self, skill_id, init_bus=True):
"""Get a plugin skill loader.
Args:
Expand All @@ -344,10 +343,7 @@ def _get_plugin_skill_loader(self, skill_id, init_bus=True, skill_class=None):
bus = None
if init_bus:
bus = self._get_internal_skill_bus()
loader = PluginSkillLoader(bus, skill_id)
if skill_class:
loader.skill_class = skill_class
return loader
return PluginSkillLoader(bus, skill_id)

def _load_plugin_skill(self, skill_id, skill_plugin):
"""Load a plugin skill.
Expand All @@ -359,7 +355,7 @@ def _load_plugin_skill(self, skill_id, skill_plugin):
Returns:
PluginSkillLoader: Loaded plugin skill loader instance if successful, None otherwise.
"""
skill_loader = self._get_plugin_skill_loader(skill_id, skill_class=skill_plugin)
skill_loader = self._get_plugin_skill_loader(skill_id)
try:
load_status = skill_loader.load(skill_plugin)
except Exception:
Expand Down

0 comments on commit 0fb9caa

Please sign in to comment.