mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-01-27 08:39:28 +01:00
Put a redirection notice at the old config.json location
This commit is contained in:
parent
9d319fd279
commit
5511d1090f
@ -139,8 +139,11 @@ def getConfig(default_val=APP_CONFIG_DEFAULTS):
|
||||
config = json.load(f)
|
||||
# Save config in new format
|
||||
setConfig(config)
|
||||
shutil.move(config_json_path, config_json_path + ".bak")
|
||||
log.info("Saved old config.json as config.json.bak")
|
||||
|
||||
with open(config_json_path, "w") as f:
|
||||
f.write("Moved to config.yaml inside the Easy Diffusion folder. You can open it in any text editor.")
|
||||
# intentionally writing invalid json, to alert any scripts that depend on this file
|
||||
|
||||
return getConfig(default_val)
|
||||
except Exception as e:
|
||||
log.warn(traceback.format_exc())
|
||||
|
Loading…
Reference in New Issue
Block a user