refactoring

This commit is contained in:
Maxim Devaev
2023-03-07 23:54:05 +02:00
parent 002031baf1
commit f652eca9c2
15 changed files with 49 additions and 49 deletions

View File

@@ -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: