From 6e10b3d2b1257748c63ef6302220c94262ef4871 Mon Sep 17 00:00:00 2001 From: Penghui Cui Date: Mon, 25 Oct 2021 16:11:38 +0800 Subject: [PATCH] Add check for attribute value to avoid exception when attribute is None --- confluent_server/confluent/config/configmanager.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/confluent_server/confluent/config/configmanager.py b/confluent_server/confluent/config/configmanager.py index 6c78f53b..8ca113a2 100644 --- a/confluent_server/confluent/config/configmanager.py +++ b/confluent_server/confluent/config/configmanager.py @@ -2281,6 +2281,9 @@ class ConfigManager(object): newdict = {'value': attribmap[node][attrname]} else: newdict = attribmap[node][attrname] + # add check here, skip None attributes + if newdict is None: + continue if 'value' in newdict and attrname.startswith("secret."): newdict['cryptvalue'] = crypt_value(newdict['value']) del newdict['value']