From f652eca9c213dd783cf2ffd02109b2353ccb86c1 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Tue, 7 Mar 2023 23:54:05 +0200 Subject: refactoring --- kvmd/apps/htpasswd/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kvmd/apps/htpasswd/__init__.py') diff --git a/kvmd/apps/htpasswd/__init__.py b/kvmd/apps/htpasswd/__init__.py index dd1213f7..b3862965 100644 --- a/kvmd/apps/htpasswd/__init__.py +++ b/kvmd/apps/htpasswd/__init__.py @@ -59,8 +59,8 @@ def _get_htpasswd_for_write(config: Section) -> Generator[passlib.apache.Htpassw try: try: st = os.stat(path) - with open(path, "rb") as htpasswd_file: - os.write(tmp_fd, htpasswd_file.read()) + with open(path, "rb") as file: + os.write(tmp_fd, file.read()) os.fchown(tmp_fd, st.st_uid, st.st_gid) os.fchmod(tmp_fd, st.st_mode) finally: -- cgit v1.2.3