2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-26 19:40:12 +00:00

Fix backup of globals

Globals failed to open the backup file as writable, causing failure if
a global had been set.
This commit is contained in:
Jarrod Johnson 2018-05-01 16:18:31 -04:00
parent 57f390fd0a
commit 73a376fd74

View File

@ -1770,7 +1770,8 @@ def dump_db_to_directory(location, password, redact=None, skipkeys=False):
cfgfile.write('\n')
bkupglobals = get_globals()
if bkupglobals:
json.dump(bkupglobals, open(os.path.join(location, 'globals.json')))
json.dump(bkupglobals, open(os.path.join(location, 'globals.json'),
'w'))
try:
for tenant in os.listdir(
os.path.join(ConfigManager._cfgdir, '/tenants/')):