mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-01-24 12:47:05 +00:00
Fixed RUF051 (if-key-in-dict-del): Use pop
instead of key in dict
followed by del dict[key]
This commit is contained in:
parent
027918d494
commit
5aded07843
@ -600,8 +600,7 @@ def get_backup_config(env, for_save=False, for_ui=False):
|
|||||||
# authentication details. The user will have to re-enter it.
|
# authentication details. The user will have to re-enter it.
|
||||||
if for_ui:
|
if for_ui:
|
||||||
for field in ("target_user", "target_pass"):
|
for field in ("target_user", "target_pass"):
|
||||||
if field in config:
|
config.pop(field, None)
|
||||||
del config[field]
|
|
||||||
|
|
||||||
# helper fields for the admin
|
# helper fields for the admin
|
||||||
config["file_target_directory"] = os.path.join(backup_root, 'encrypted')
|
config["file_target_directory"] = os.path.join(backup_root, 'encrypted')
|
||||||
|
Loading…
Reference in New Issue
Block a user