mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-11-25 09:44:25 +01:00
Fix a bug where the config file wasn't actually read on linux/mac
This commit is contained in:
parent
391e12e20d
commit
6ea7dd36da
@ -298,7 +298,7 @@ Thanks!"""
|
|||||||
|
|
||||||
def get_config():
|
def get_config():
|
||||||
config_directory = os.path.dirname(__file__) # this will be "scripts"
|
config_directory = os.path.dirname(__file__) # this will be "scripts"
|
||||||
config_yaml = os.path.join(config_directory, "..", "config.yaml")
|
config_yaml = os.path.abspath(os.path.join(config_directory, "..", "config.yaml"))
|
||||||
config_json = os.path.join(config_directory, "config.json")
|
config_json = os.path.join(config_directory, "config.json")
|
||||||
|
|
||||||
config = None
|
config = None
|
||||||
|
@ -6,6 +6,7 @@ import shutil
|
|||||||
# The config file is in the same directory as this script
|
# The config file is in the same directory as this script
|
||||||
config_directory = os.path.dirname(__file__)
|
config_directory = os.path.dirname(__file__)
|
||||||
config_yaml = os.path.join(config_directory, "..", "config.yaml")
|
config_yaml = os.path.join(config_directory, "..", "config.yaml")
|
||||||
|
config_yaml = os.path.abspath(config_yaml)
|
||||||
config_json = os.path.join(config_directory, "config.json")
|
config_json = os.path.join(config_directory, "config.json")
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description='Get values from config file')
|
parser = argparse.ArgumentParser(description='Get values from config file')
|
||||||
|
@ -119,6 +119,7 @@ def init_render_threads():
|
|||||||
|
|
||||||
def getConfig(default_val=APP_CONFIG_DEFAULTS):
|
def getConfig(default_val=APP_CONFIG_DEFAULTS):
|
||||||
config_yaml_path = os.path.join(CONFIG_DIR, "..", "config.yaml")
|
config_yaml_path = os.path.join(CONFIG_DIR, "..", "config.yaml")
|
||||||
|
config_yaml_path = os.path.abspath(config_yaml_path)
|
||||||
|
|
||||||
# migrate the old config yaml location
|
# migrate the old config yaml location
|
||||||
config_legacy_yaml = os.path.join(CONFIG_DIR, "config.yaml")
|
config_legacy_yaml = os.path.join(CONFIG_DIR, "config.yaml")
|
||||||
|
Loading…
Reference in New Issue
Block a user