2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-30 12:57:46 +00:00

Do not write out keys when redacting

It's silly to store keys when redact is requested
This commit is contained in:
Jarrod Johnson 2017-01-30 16:13:49 -05:00
parent 04781e0ece
commit 5395f97a21

View File

@ -1476,9 +1476,10 @@ def restore_db_from_directory(location, password):
def dump_db_to_directory(location, password, redact=None):
with open(os.path.join(location, 'keys.json'), 'w') as cfgfile:
cfgfile.write(_dump_keys(password))
cfgfile.write('\n')
if not redact:
with open(os.path.join(location, 'keys.json'), 'w') as cfgfile:
cfgfile.write(_dump_keys(password))
cfgfile.write('\n')
with open(os.path.join(location, 'main.json'), 'w') as cfgfile:
cfgfile.write(ConfigManager(tenant=None)._dump_to_json(redact=redact))
cfgfile.write('\n')