From 0fd6b2669d9fb4e338379f07720bca76d948d58d Mon Sep 17 00:00:00 2001 From: Grant Date: Wed, 26 Mar 2025 17:38:49 -0500 Subject: [PATCH 1/2] check for None, replace with [] --- src/warnet/users.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/warnet/users.py b/src/warnet/users.py index 52a2c1080..7380ec508 100644 --- a/src/warnet/users.py +++ b/src/warnet/users.py @@ -41,6 +41,8 @@ def auth(auth_config): if not is_first_config: for category in ["clusters", "users", "contexts"]: if category in auth_config: + if not base_config[category]: + base_config[category] = [] merge_entries(category, base_config, auth_config) new_current_context = auth_config.get("current-context") From 952bfff64a438c8f7bb3d04fdbe74d379030bcc2 Mon Sep 17 00:00:00 2001 From: Grant Date: Mon, 31 Mar 2025 09:28:10 -0500 Subject: [PATCH 2/2] handle missing key in base config --- src/warnet/users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/warnet/users.py b/src/warnet/users.py index 7380ec508..4a46ef633 100644 --- a/src/warnet/users.py +++ b/src/warnet/users.py @@ -41,7 +41,7 @@ def auth(auth_config): if not is_first_config: for category in ["clusters", "users", "contexts"]: if category in auth_config: - if not base_config[category]: + if category in base_config and not base_config[category]: base_config[category] = [] merge_entries(category, base_config, auth_config)