mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-01-23 12:37: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.
|
||||
if for_ui:
|
||||
for field in ("target_user", "target_pass"):
|
||||
if field in config:
|
||||
del config[field]
|
||||
config.pop(field, None)
|
||||
|
||||
# helper fields for the admin
|
||||
config["file_target_directory"] = os.path.join(backup_root, 'encrypted')
|
||||
|
Loading…
Reference in New Issue
Block a user