initialize status members before bus handlers
self._loaded_status was accessed from a message handler, if a message is
received at the precisely wrong time an exception may occur. This fixes
the init order.
Also moves the skill_updater creation to be fore the handlers are
registered.
@@ -131,14 +131,15 @@ class SkillManager(Thread):
self.initial_load_complete = False
self.num_install_retries = 0
self.settings_downloader = SkillSettingsDownloader(self.bus)
- self._define_message_bus_events()
- self.skill_updater = SkillUpdater()
- self.daemon = True
# Statuses
self._alive_status = False # True after priority skills has loaded
self._loaded_status = False # True after all skills has loaded
+ self.skill_updater = SkillUpdater()
+ self._define_message_bus_events()
+ self.daemon = True
+
def _define_message_bus_events(self):
"""Define message bus events with handlers defined in this class."""
# Conversation management
