Allow startup if update attempt occurs
update_attempt will block waiting for the update to complete and the
update will shutdown the running skills process if an update is needed.
@@ -79,11 +79,13 @@ class DevicePrimer(object):
"""Internet dependent updates of various aspects of the device."""
self._get_pairing_status()
self._update_system_clock()
- update_attempted = self._update_system()
- if not update_attempted:
if self.time_skew_threshold_exceeded:
self._reboot()
else:
+ self._update_system()
+ # Above will block during update process and kill this instance if
+ # new software is installed
+
if self.backend_down:
self._notify_backend_down()
else:
@@ -182,7 +184,6 @@ class DevicePrimer(object):
def _update_system(self):
"""Emit an update event that will be handled by the admin service."""
- update_attempted = False
if not self.is_paired:
LOG.info('Attempting system update...')
self.bus.emit(Message('system.update'))
@@ -198,9 +199,6 @@ class DevicePrimer(object):
'system.update.complete',
1000
)
- update_attempted = True
-
- return update_attempted
def _speak_dialog(self, dialog_id, wait=False):
data = {'utterance': dialog.get(dialog_id)}
