1
0
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:
Teal Dulcet 2025-01-08 05:10:30 -08:00
parent 027918d494
commit 5aded07843

View File

@ -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')