From 542835655f16e60d7ad84e8f443cfc52a69c79f8 Mon Sep 17 00:00:00 2001
From: Teal Dulcet <tdulcet@pdx.edu>
Date: Fri, 21 Mar 2025 04:56:15 -0700
Subject: [PATCH] Fixed FURB122 (for-loop-writes): Use of `f.write` in a for
 loop

---
 management/utils.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/management/utils.py b/management/utils.py
index 879776c3..5a036103 100644
--- a/management/utils.py
+++ b/management/utils.py
@@ -21,8 +21,7 @@ def load_env_vars_from_file(fn):
 
 def save_environment(env):
     with open("/etc/mailinabox.conf", "w", encoding="utf-8") as f:
-        for k, v in env.items():
-            f.write(f"{k}={v}\n")
+        f.writelines(f"{k}={v}\n" for k, v in env.items())
 
 # THE SETTINGS FILE AT STORAGE_ROOT/settings.yaml.