From 8ca4fb5f1f2bbd720adb5b6cadf55c37cfa3e398 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Mon, 13 Dec 2021 17:17:56 -0800 Subject: [PATCH 1/2] Catch and handle missing optional skill files --- ovos_skills_manager/github/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ovos_skills_manager/github/__init__.py b/ovos_skills_manager/github/__init__.py index 8e5338c..b03a727 100644 --- a/ovos_skills_manager/github/__init__.py +++ b/ovos_skills_manager/github/__init__.py @@ -205,6 +205,8 @@ def get_requirements_json(url, branch=None): try: manif = get_manifest(url, branch) data = manif['dependencies'] or {} + except GithubFileNotFound: + LOG.debug("No manifest file available") except GithubSkillEntryError: LOG.error("Error reading from manifest!") data["python"] = data.get("python") or [] @@ -218,6 +220,8 @@ def get_requirements_json(url, branch=None): try: skill_req = get_skill_requirements(url, branch) data["skill"] = list(set(data["skill"] + skill_req)) + except GithubFileNotFound: + LOG.debug("No skill requirements file available") except GithubSkillEntryError: LOG.error("Error reading skills requirements!") return data From b9bf79d2a155331f2ed536c44027738bbacf775a Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Mon, 13 Dec 2021 17:35:25 -0800 Subject: [PATCH 2/2] Handle requirements.txt too --- ovos_skills_manager/github/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ovos_skills_manager/github/__init__.py b/ovos_skills_manager/github/__init__.py index b03a727..6e2f04d 100644 --- a/ovos_skills_manager/github/__init__.py +++ b/ovos_skills_manager/github/__init__.py @@ -215,6 +215,8 @@ def get_requirements_json(url, branch=None): try: req = get_requirements(url, branch) data["python"] = list(set(data["python"] + req)) + except GithubFileNotFound: + LOG.debug("No python requirements file available") except GithubSkillEntryError: LOG.error("Error reading from requirements files!") try: