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:
parent
05a683698e
commit
6e10b3d2b1
@ -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']
|
||||
|
Loading…
x
Reference in New Issue
Block a user