mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
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
This commit is contained in:
parent
548e0ebd60
commit
b097731e40
@ -304,8 +304,9 @@ def main():
|
|||||||
module_loader.load_modules()
|
module_loader.load_modules()
|
||||||
if arguments.setup is not False:
|
if arguments.setup is not False:
|
||||||
run_setup_and_exit(arguments.setup)
|
run_setup_and_exit(arguments.setup)
|
||||||
|
|
||||||
if arguments.setup_no_install is not False:
|
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:
|
if arguments.diagnose:
|
||||||
run_diagnostics_and_exit()
|
run_diagnostics_and_exit()
|
||||||
|
|||||||
@ -40,6 +40,7 @@ class Helper(object):
|
|||||||
self.current_operation = None
|
self.current_operation = None
|
||||||
self.is_finished = None
|
self.is_finished = None
|
||||||
self.exception = None
|
self.exception = None
|
||||||
|
self.allow_install = True
|
||||||
|
|
||||||
def run_in_thread(self):
|
def run_in_thread(self):
|
||||||
"""Execute the setup process in a thread."""
|
"""Execute the setup process in a thread."""
|
||||||
@ -98,6 +99,7 @@ class Helper(object):
|
|||||||
for package_name in package_names:
|
for package_name in package_names:
|
||||||
if not cache[package_name].is_installed:
|
if not cache[package_name].is_installed:
|
||||||
raise PackageNotInstalledError(package_name)
|
raise PackageNotInstalledError(package_name)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
logger.info('Running install for module - %s, packages - %s',
|
logger.info('Running install for module - %s, packages - %s',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user