1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-03 00:07:05 +00:00

A direct reference to custom.yaml filename is removed.

This commit is contained in:
pappapisshu 2023-01-30 21:59:40 +01:00
parent d1f21d601e
commit 673a0e58ec

View File

@ -631,7 +631,6 @@ def set_b2_backup_config(env, min_age_in_days, target_url):
return "OK" return "OK"
def get_backup_config(env): def get_backup_config(env):
backup_root = get_backup_root_directory(env)
# Defaults. # Defaults.
config = { config = {
@ -641,7 +640,7 @@ def get_backup_config(env):
# Merge in anything written to custom.yaml. # Merge in anything written to custom.yaml.
try: try:
with open(os.path.join(backup_root, 'custom.yaml'), 'r') as f: with open(get_backup_configuration_file(env), 'r') as f:
custom_config = rtyaml.load(f) custom_config = rtyaml.load(f)
if not isinstance(custom_config, dict): raise ValueError() # caught below if not isinstance(custom_config, dict): raise ValueError() # caught below