mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-11-29 19:53:40 +01:00
Handle the legacy yaml config path
This commit is contained in:
parent
d98e4772ac
commit
3120b593c6
@ -102,7 +102,13 @@ def getConfig(default_val=APP_CONFIG_DEFAULTS):
|
|||||||
config_json_path = os.path.join(CONFIG_DIR, "config.json")
|
config_json_path = os.path.join(CONFIG_DIR, "config.json")
|
||||||
|
|
||||||
# compatibility with upcoming yaml changes, switching from beta to main
|
# compatibility with upcoming yaml changes, switching from beta to main
|
||||||
config_yaml_path = os.path.join(CONFIG_DIR, "config.yaml")
|
config_yaml_path = os.path.join(CONFIG_DIR, "..", "config.yaml")
|
||||||
|
|
||||||
|
# migrate the old config yaml location
|
||||||
|
config_legacy_yaml = os.path.join(CONFIG_DIR, "config.yaml")
|
||||||
|
if os.path.isfile(config_legacy_yaml):
|
||||||
|
shutil.move(config_legacy_yaml, config_yaml_path)
|
||||||
|
|
||||||
if os.path.exists(config_yaml_path):
|
if os.path.exists(config_yaml_path):
|
||||||
try:
|
try:
|
||||||
import yaml
|
import yaml
|
||||||
|
Loading…
Reference in New Issue
Block a user