added safety net for null values in get settings
@@ -73,7 +73,6 @@ class SkillSettings(dict):
LOG.info("a uuid exist for {}".format(self.name) +
" deleting old one")
old_uuid = self._load_uuid()
- LOG.info(old_uuid+self.name)
self._delete_metatdata(old_uuid)
except Exception as e:
LOG.info(e)
@@ -273,10 +272,12 @@ class SkillSettings(dict):
def _get_remote_settings(self):
""" Get skill settings for this device from backend """
- return self.api.request({
+ settings = self.api.request({
"method": "GET",
"path": self._api_path
})
+ settings = [skills for skills in settings if skills is not None]
+ return settings
def _put_metadata(self, settings_meta):
""" PUT settingsmeta to backend to be configured in home.mycroft.ai.
@@ -296,7 +297,7 @@ class SkillSettings(dict):
"""
return self.api.request({
"method": "DELETE",
- "path": "/skill/{}".format(uuid)
+ "path": self._api_path+"/{}".format(uuid)
})
def store(self, force=False):
