2
0
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:
Jarrod Johnson
2021-11-17 09:24:26 -05:00
parent cc1b887c31
commit 44cc580364

View File

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