From 4197d39b0c4d069ab723edd29c1e20a3ccd49674 Mon Sep 17 00:00:00 2001 From: David Boreham Date: Mon, 4 Sep 2023 15:23:22 -0600 Subject: [PATCH] Fix lint errors (#525) --- .../stacks/mainnet-laconic/deploy/commands.py | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/app/data/stacks/mainnet-laconic/deploy/commands.py b/app/data/stacks/mainnet-laconic/deploy/commands.py index 14771617..a655b502 100644 --- a/app/data/stacks/mainnet-laconic/deploy/commands.py +++ b/app/data/stacks/mainnet-laconic/deploy/commands.py @@ -124,17 +124,8 @@ def _insert_persistent_peers(options: CommandOptions, config_dir: Path, new_pers output_file.write(config_file_content) -def setup(command_context: DeployCommandContext, parameters: LaconicStackSetupCommand, extra_args): - - options = command_context.cluster_context.options - - currency = "stake" # Does this need to be a parameter? - - if options.debug: - print(f"parameters: {parameters}") - +def _phase_from_params(parameters): phase = SetupPhase.ILLEGAL - if parameters.initialize_network: if parameters.join_network or parameters.create_network: print("Can't supply --join-network or --create-network with --initialize-network") @@ -157,6 +148,19 @@ def setup(command_context: DeployCommandContext, parameters: LaconicStackSetupCo print("Can't supply --initialize-network or --join-network with --create-network") sys.exit(1) phase = SetupPhase.CREATE + return phase + + +def setup(command_context: DeployCommandContext, parameters: LaconicStackSetupCommand, extra_args): + + options = command_context.cluster_context.options + + currency = "stake" # Does this need to be a parameter? + + if options.debug: + print(f"parameters: {parameters}") + + phase = _phase_from_params() network_dir = Path(parameters.network_dir).absolute() laconicd_home_path_in_container = "/laconicd-home" @@ -233,7 +237,7 @@ def setup(command_context: DeployCommandContext, parameters: LaconicStackSetupCo else: # We're generating the genesis file if not parameters.gentx_file_list: - print(f"Error: --gentx-files must be supplied") + print("Error: --gentx-files must be supplied") sys.exit(1) # First look in the supplied gentx files for the other nodes' keys other_node_keys = _get_node_keys_from_gentx_files(options, parameters.gentx_file_list)