diff --git a/config/main.py b/config/main.py index 45fd5525a1cb..f914e6465380 100644 --- a/config/main.py +++ b/config/main.py @@ -1421,15 +1421,17 @@ def reload(db, filename, yes, load_sysinfo, no_service_restart, disable_arp_cach # or by default DEFAULT_CONFIG_DB_FILE. In the case of database service running in namespace, # the default config_db.json format is used. + config_gen_opts = "" + + if os.path.isfile(INIT_CFG_FILE): + config_gen_opts += " -j {} ".format(INIT_CFG_FILE) + if file_format == 'config_db': config_gen_opts += ' -j {} '.format(file) else: config_gen_opts += ' -Y {} '.format(file) - if os.path.isfile(INIT_CFG_FILE): - config_gen_opts += " -j {} ".format(INIT_CFG_FILE) - if namespace is not None: config_gen_opts += " -n {} ".format(namespace)