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:
commit
154a328194
@ -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…
Reference in New Issue
Block a user