Skip to content

Commit

Permalink
Prevent raising exception when msm config not present (#51)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel McKnight <daniel@neon.ai>
  • Loading branch information
NeonDaniel and NeonDaniel authored Jun 15, 2022
1 parent a855f68 commit 5308013
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ovos_utils/skills/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ def get_skills_folder(config=None):
# read user defined location
config = config or read_mycroft_config()
if config:
skill_folder = config["skills"]["msm"]["directory"]
return join(config["data_dir"], skill_folder)
skill_folder = config["skills"].get("msm", {}).get("directory")
if skill_folder:
return join(config["data_dir"], skill_folder)

# check if default path exists
elif isdir("/opt/mycroft/skills"):
Expand Down

0 comments on commit 5308013

Please sign in to comment.