2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-02-16 18:49:04 +00:00

Add check for attribute value to avoid exception when attribute is None

This commit is contained in:
Penghui Cui 2021-10-25 16:11:38 +08:00
parent 05a683698e
commit 6e10b3d2b1

View File

@ -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']