From b097731e4039c24700eaa493ff981e1f108d7702 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Sat, 3 Sep 2016 11:12:11 +0530 Subject: [PATCH] setup: Fix arguments to setup without install - When arguments are passed to --setup-no-install, use them correctly. - Explicitly initialize member in constructor - Minor indentation --- plinth/__main__.py | 3 ++- plinth/setup.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/plinth/__main__.py b/plinth/__main__.py index b5ecc5b99..0f18e697b 100644 --- a/plinth/__main__.py +++ b/plinth/__main__.py @@ -304,8 +304,9 @@ def main(): module_loader.load_modules() if arguments.setup is not False: run_setup_and_exit(arguments.setup) + if arguments.setup_no_install is not False: - run_setup_and_exit(arguments.setup, allow_install=False) + run_setup_and_exit(arguments.setup_no_install, allow_install=False) if arguments.diagnose: run_diagnostics_and_exit() diff --git a/plinth/setup.py b/plinth/setup.py index 9b99271ca..e6479ed35 100644 --- a/plinth/setup.py +++ b/plinth/setup.py @@ -40,6 +40,7 @@ class Helper(object): self.current_operation = None self.is_finished = None self.exception = None + self.allow_install = True def run_in_thread(self): """Execute the setup process in a thread.""" @@ -98,6 +99,7 @@ class Helper(object): for package_name in package_names: if not cache[package_name].is_installed: raise PackageNotInstalledError(package_name) + return logger.info('Running install for module - %s, packages - %s',