From 1b17c42cae3eba5ab9c7b5da05038c2afe95adbb Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 1 May 2018 16:18:31 -0400 Subject: [PATCH] Fix backup of globals Globals failed to open the backup file as writable, causing failure if a global had been set. --- confluent_server/confluent/config/configmanager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/confluent_server/confluent/config/configmanager.py b/confluent_server/confluent/config/configmanager.py index b6bd2600..21061088 100644 --- a/confluent_server/confluent/config/configmanager.py +++ b/confluent_server/confluent/config/configmanager.py @@ -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/')):