From 8af5ce09cfdd82371dddb894a303c80482974447 Mon Sep 17 00:00:00 2001 From: Jarbas Date: Thu, 29 Jun 2017 20:36:02 +0100 Subject: [PATCH 1/5] read blacklisted skills from config --- mycroft/skills/core.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mycroft/skills/core.py b/mycroft/skills/core.py index b5e494e40b..59f0264ddf 100644 --- a/mycroft/skills/core.py +++ b/mycroft/skills/core.py @@ -36,7 +36,9 @@ from mycroft.util.log import getLogger from mycroft.skills.settings import SkillSettings __author__ = 'seanfitz' -BLACKLISTED_SKILLS = ["send_sms", "media"] +skills_config = ConfigurationManager.instance().get("skills") +BLACKLISTED_SKILLS = skills_config["blacklisted_skills"] + SKILLS_DIR = "/opt/mycroft/skills" MainModule = '__init__' From 6b9c2d8e74b81d15879d42c48da17a22e6263b4d Mon Sep 17 00:00:00 2001 From: Jarbas Date: Thu, 29 Jun 2017 20:39:09 +0100 Subject: [PATCH 2/5] add blacklisted skills --- mycroft/configuration/mycroft.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mycroft/configuration/mycroft.conf b/mycroft/configuration/mycroft.conf index 23714c8331..9b7db40a2b 100644 --- a/mycroft/configuration/mycroft.conf +++ b/mycroft/configuration/mycroft.conf @@ -82,7 +82,9 @@ // Directory to look for user skills "directory": "~/.mycroft/skills", // TODO: Old unused kludge, remove from code - "stop_threshold": 2.0 + "stop_threshold": 2.0, + // blacklisted skills to not load + "blacklisted_skills": ["media", "send_sms"] }, // Address of the REMOTE server From d4177d43a04bcbee2b3f8274f23b9bfe5a1d1550 Mon Sep 17 00:00:00 2001 From: Jarbas Date: Thu, 29 Jun 2017 21:42:05 +0100 Subject: [PATCH 3/5] Update mycroft.conf --- mycroft/configuration/mycroft.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mycroft/configuration/mycroft.conf b/mycroft/configuration/mycroft.conf index 9b7db40a2b..c0f281fdb5 100644 --- a/mycroft/configuration/mycroft.conf +++ b/mycroft/configuration/mycroft.conf @@ -84,7 +84,7 @@ // TODO: Old unused kludge, remove from code "stop_threshold": 2.0, // blacklisted skills to not load - "blacklisted_skills": ["media", "send_sms"] + "blacklisted_skills": ["skill-media", "send_sms"] }, // Address of the REMOTE server From ebe1c7fcea766cc4520be97842de686ef629fd54 Mon Sep 17 00:00:00 2001 From: Jarbas Date: Thu, 29 Jun 2017 21:44:21 +0100 Subject: [PATCH 4/5] use get --- mycroft/skills/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mycroft/skills/core.py b/mycroft/skills/core.py index 59f0264ddf..0aae90f49f 100644 --- a/mycroft/skills/core.py +++ b/mycroft/skills/core.py @@ -37,7 +37,7 @@ from mycroft.skills.settings import SkillSettings __author__ = 'seanfitz' skills_config = ConfigurationManager.instance().get("skills") -BLACKLISTED_SKILLS = skills_config["blacklisted_skills"] +BLACKLISTED_SKILLS = skills_config.get("blacklisted_skills",[]) SKILLS_DIR = "/opt/mycroft/skills" From 2c0ed93e4b2faaa359f1087423fc9d5f86ecc9bd Mon Sep 17 00:00:00 2001 From: Jarbas Date: Fri, 30 Jun 2017 20:27:33 +0100 Subject: [PATCH 5/5] pep8 --- mycroft/skills/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mycroft/skills/core.py b/mycroft/skills/core.py index 0aae90f49f..023a568f6e 100644 --- a/mycroft/skills/core.py +++ b/mycroft/skills/core.py @@ -37,7 +37,7 @@ from mycroft.skills.settings import SkillSettings __author__ = 'seanfitz' skills_config = ConfigurationManager.instance().get("skills") -BLACKLISTED_SKILLS = skills_config.get("blacklisted_skills",[]) +BLACKLISTED_SKILLS = skills_config.get("blacklisted_skills", []) SKILLS_DIR = "/opt/mycroft/skills"