mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-03-09 16:37:23 +01:00
Fixed UP015 (redundant-open-modes): Unnecessary open mode parameters
This commit is contained in:
committed by
Joshua Tauberer
parent
0ee64f2fe8
commit
cb922ec286
@@ -578,7 +578,7 @@ def get_backup_config(env, for_save=False, for_ui=False):
|
||||
|
||||
# Merge in anything written to custom.yaml.
|
||||
try:
|
||||
with open(os.path.join(backup_root, 'custom.yaml'), 'r') as f:
|
||||
with open(os.path.join(backup_root, 'custom.yaml')) as f:
|
||||
custom_config = rtyaml.load(f)
|
||||
if not isinstance(custom_config, dict): raise ValueError() # caught below
|
||||
config.update(custom_config)
|
||||
@@ -604,7 +604,7 @@ def get_backup_config(env, for_save=False, for_ui=False):
|
||||
config["target"] = "file://" + config["file_target_directory"]
|
||||
ssh_pub_key = os.path.join('/root', '.ssh', 'id_rsa_miab.pub')
|
||||
if os.path.exists(ssh_pub_key):
|
||||
with open(ssh_pub_key, 'r') as f:
|
||||
with open(ssh_pub_key) as f:
|
||||
config["ssh_pub_key"] = f.read()
|
||||
|
||||
return config
|
||||
|
||||
Reference in New Issue
Block a user