From 83b4a91b8ba4392afb5be7a932f921e41b0b783c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85ke=20Forslund?= Date: Sat, 29 Jun 2019 21:00:15 +0200 Subject: [PATCH] Remove incorrect settings meta upload disable flag This allows core to retry sending settings meta after a failed attempt --- mycroft/skills/settings.py | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/mycroft/skills/settings.py b/mycroft/skills/settings.py index d1b186a715..74c134c734 100644 --- a/mycroft/skills/settings.py +++ b/mycroft/skills/settings.py @@ -152,7 +152,6 @@ class SkillSettings(dict): self._poll_timer = None self._blank_poll_timer = None self._is_alive = True - self._meta_upload = True # Flag allowing upload of settings meta # Add Information extracted from the skills-meta.json entry for the # skill. @@ -294,23 +293,22 @@ class SkillSettings(dict): Returns: dict: uuid, a unique id for the setting meta data """ - if self._meta_upload: - try: - uuid = self.api.upload_skill_metadata( - self._type_cast(settings_meta, to_platform='web')) - return uuid - except HTTPError as e: - if e.response.status_code in [422, 500, 501]: - self._meta_upload = False - raise DelayRequest - else: - LOG.error(e) - return None - - except Exception as e: + try: + uuid = self.api.upload_skill_metadata( + self._type_cast(settings_meta, to_platform='web')) + return uuid + except HTTPError as e: + if e.response.status_code in [422, 500, 501]: + LOG.info(e.response.status_code) + raise DelayRequest + else: LOG.error(e) return None + except Exception as e: + LOG.error(e) + return None + def save_skill_settings(self, skill_settings): """ Takes skill object and save onto self