2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 09:32:21 +00:00

Merge pull request #81 from PenghuiCui/master

Add check for attribute value to avoid exception when attribute is None
This commit is contained in:
Jarrod Johnson 2021-10-26 07:35:10 -04:00 committed by GitHub
commit 154a328194
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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