diff options
author | Devaev Maxim <[email protected]> | 2019-09-24 08:35:21 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2019-09-24 08:35:21 +0300 |
commit | cfe0c0754317eeef46c003cf72fd0f72aebb25ce (patch) | |
tree | 8d4218d22ca140b7808b9df4e6a6c03714663a73 /kvmd | |
parent | d3d885e1801392fffbd07656f8692c5be6014edd (diff) |
refactoring
Diffstat (limited to 'kvmd')
-rw-r--r-- | kvmd/apps/htpasswd/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kvmd/apps/htpasswd/__init__.py b/kvmd/apps/htpasswd/__init__.py index b4d1cc2c..bf03dd47 100644 --- a/kvmd/apps/htpasswd/__init__.py +++ b/kvmd/apps/htpasswd/__init__.py @@ -59,11 +59,11 @@ def _get_htpasswd_for_write(config: Section) -> Generator[passlib.apache.Htpassw ) try: try: - stat = os.stat(path) + st = os.stat(path) with open(path, "rb") as htpasswd_file: os.write(tmp_fd, htpasswd_file.read()) - os.fchown(tmp_fd, stat.st_uid, stat.st_gid) - os.fchmod(tmp_fd, stat.st_mode) + os.fchown(tmp_fd, st.st_uid, st.st_gid) + os.fchmod(tmp_fd, st.st_mode) finally: os.close(tmp_fd) htpasswd = passlib.apache.HtpasswdFile(tmp_path) |