From b9dc2d38f65afc17c9801cbc35fa68ed5b47fe27 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Wed, 24 Nov 2021 12:04:05 -0800 Subject: [PATCH] setup: Use apps instead of modules to determine running first setup Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/setup.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plinth/setup.py b/plinth/setup.py index 1236b5cd9..4ce029f0e 100644 --- a/plinth/setup.py +++ b/plinth/setup.py @@ -240,12 +240,10 @@ def _get_apps_for_regular_setup(): def _set_is_first_setup(): - """Set whether all essential modules have been setup at least once.""" + """Set whether all essential apps have been setup at least once.""" global _is_first_setup - modules = plinth.module_loader.loaded_modules.values() - _is_first_setup = any( - (module for module in modules - if module.app.info.is_essential and module.app.needs_setup())) + _is_first_setup = any((app for app in app_module.App.list() + if app.info.is_essential and app.needs_setup())) def run_setup_on_apps(app_ids, allow_install=True):