From 5718e07238cde541ce61fe86e2e1e17514da7432 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 29 Nov 2021 11:22:48 -0500 Subject: [PATCH] Treat empty attributes as unset This fixes behavior when, for example, crypted.rootpassword is explicitly blanked --- .../confluent/plugins/configuration/attributes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/confluent_server/confluent/plugins/configuration/attributes.py b/confluent_server/confluent/plugins/configuration/attributes.py index 4b9cb71d..60e80fd6 100644 --- a/confluent_server/confluent/plugins/configuration/attributes.py +++ b/confluent_server/confluent/plugins/configuration/attributes.py @@ -99,7 +99,7 @@ def retrieve_nodegroup(nodegroup, element, configmanager, inputdata): yield msg.ListAttributes( kv={attribute: currattr}, desc=desc) - else: + elif currattr: print(attribute) print(repr(currattr)) raise Exception("BUGGY ATTRIBUTE FOR NODEGROUP") @@ -148,7 +148,7 @@ def retrieve_nodes(nodes, element, configmanager, inputdata): elif isinstance(currattr, list): yield msg.ListAttributes( node, {attribute: currattr}, desc) - else: + elif currattr: print(attribute) print(repr(currattr)) raise Exception("BUGGY ATTRIBUTE FOR NODE")