firstboot: Only add steps from modules if they have completed setup

This commit is contained in:
James Valleroy 2016-12-04 15:21:09 -05:00
parent 0fdc0ffe52
commit 9da23fa560
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -69,7 +69,8 @@ def _get_steps():
modules = module_loader.loaded_modules
for module_object in modules.values():
if getattr(module_object, 'first_boot_steps', None):
steps.extend(module_object.first_boot_steps)
if module_object.setup_helper.get_state() != 'needs-setup':
steps.extend(module_object.first_boot_steps)
_all_first_boot_steps = sorted(steps, key=operator.itemgetter('order'))
return _all_first_boot_steps