mirror of
https://github.com/xcat2/confluent.git
synced 2026-01-12 02:52:30 +00:00
Correct handling of blank value in attribute
This commit is contained in:
@@ -1764,7 +1764,7 @@ class ConfigManager(object):
|
||||
if attrib.startswith('crypted.'):
|
||||
if not isinstance(curr[attrib], dict):
|
||||
curr[attrib] = {'value': curr[attrib]}
|
||||
if 'hashvalue' not in curr[attrib] and curr[attrib]['value']:
|
||||
if 'hashvalue' not in curr[attrib] and curr[attrib].get('value', None):
|
||||
curr[attrib]['hashvalue'] = hashcrypt_value(
|
||||
curr[attrib]['value'])
|
||||
if 'grubhashvalue' not in curr[attrib]:
|
||||
@@ -2186,7 +2186,7 @@ class ConfigManager(object):
|
||||
if attrib.startswith('crypted.'):
|
||||
if not isinstance(curr[attrib], dict):
|
||||
curr[attrib] = {'value': curr[attrib]}
|
||||
if 'hashvalue' not in curr[attrib] and curr[attrib]['value']:
|
||||
if 'hashvalue' not in curr[attrib] and curr[attrib].get('value', None):
|
||||
curr[attrib]['hashvalue'] = hashcrypt_value(
|
||||
curr[attrib]['value'])
|
||||
if 'grubhashvalue' not in curr[attrib]:
|
||||
|
||||
Reference in New Issue
Block a user