fixed an issue where a potential race condition can cause the settingsMeta API call to be issued without a device ID in the URL.
@@ -156,7 +156,7 @@ class SettingsMetaUploader:
self.yaml_path = self.skill_directory.joinpath('settingsmeta.yaml')
self.config = Configuration.get()
self.settings_meta = {}
- self.api = DeviceApi()
+ self.api = None
self.upload_timer = None
# Property placeholders
@@ -228,6 +228,8 @@ class SettingsMetaUploader:
"""
synced = False
if is_paired():
+ self.api = DeviceApi()
+ if self.api.identity.uuid:
settings_meta_file_exists = (
self.json_path.is_file() or
self.yaml_path.is_file()
@@ -238,6 +240,8 @@ class SettingsMetaUploader:
self._update_settings_meta()
LOG.debug('Uploading settings meta for ' + self.skill_gid)
synced = self._issue_api_call()
+ else:
+ LOG.debug('settingsmeta.json not uploaded - no identity')
else:
LOG.debug('settingsmeta.json not uploaded - device is not paired')
