--config CLI Param fix
This commit is contained in:
@@ -204,6 +204,22 @@ def get_config_path():
|
||||
return CONFIG_FOLDER_NAME
|
||||
|
||||
|
||||
_dashboard_config_path_override = None
|
||||
|
||||
|
||||
def set_dashboard_config_path_override(path):
|
||||
"""Sets a global override for the dashboard config file path (used by --config CLI arg)."""
|
||||
global _dashboard_config_path_override
|
||||
_dashboard_config_path_override = path
|
||||
|
||||
|
||||
def get_dashboard_config_path(config_file_name):
|
||||
"""Returns the dashboard config file path, respecting any --config CLI override."""
|
||||
if _dashboard_config_path_override:
|
||||
return _dashboard_config_path_override
|
||||
return os.path.join(get_config_path(), config_file_name)
|
||||
|
||||
|
||||
def get_old_filename(current_filename, old_suffix="_old"):
|
||||
"""Generate old backup filename from current filename.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user