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

Fixed FURB122 (for-loop-writes): Use of f.write in a for loop

This commit is contained in:
Teal Dulcet 2025-03-21 04:56:15 -07:00
parent 6e23d9d223
commit 542835655f

View File

@ -21,8 +21,7 @@ def load_env_vars_from_file(fn):
def save_environment(env): def save_environment(env):
with open("/etc/mailinabox.conf", "w", encoding="utf-8") as f: with open("/etc/mailinabox.conf", "w", encoding="utf-8") as f:
for k, v in env.items(): f.writelines(f"{k}={v}\n" for k, v in env.items())
f.write(f"{k}={v}\n")
# THE SETTINGS FILE AT STORAGE_ROOT/settings.yaml. # THE SETTINGS FILE AT STORAGE_ROOT/settings.yaml.