mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-06-20 09:57:49 +02: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)
|
config = json.load(f)
|
||||||
# Save config in new format
|
# Save config in new format
|
||||||
setConfig(config)
|
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)
|
return getConfig(default_val)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.warn(traceback.format_exc())
|
log.warn(traceback.format_exc())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user