From 65d2b7869ca07c46ce8a870db8a2257e48d4c420 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Wed, 23 Aug 2023 01:38:50 -0400 Subject: [PATCH] Restore original no-connection behavior Previously not specifying a connection when multiple were available would error. This restores that behaviour. --- client-cli/pvc/cli/cli.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/client-cli/pvc/cli/cli.py b/client-cli/pvc/cli/cli.py index 3d3cac25..1e1d9aa4 100644 --- a/client-cli/pvc/cli/cli.py +++ b/client-cli/pvc/cli/cli.py @@ -5600,11 +5600,8 @@ def cli( global CLI_CONFIG store_data = get_store(store_path) - # If no connection is specified, use the first connection in the store - if _connection is None: - CLI_CONFIG = get_config(store_data, list(store_data.keys())[0]) # If the connection isn't in the store, mark it bad but pass the value - elif _connection not in store_data.keys(): + if _connection is not None and _connection not in store_data.keys(): CLI_CONFIG = {"badcfg": True, "connection": _connection} else: CLI_CONFIG = get_config(store_data, _connection)