diff options
author | Maxim Devaev <[email protected]> | 2022-04-10 06:14:48 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-04-10 06:14:48 +0300 |
commit | c92d17dea21fbcf461716331ea7fd3500476edb9 (patch) | |
tree | 0d170fcf38d71a4762e8be15784c56fc23017d9e /kvmd | |
parent | 486f1be9867fcb3220a2918ddd5b0371ece17d5d (diff) |
refactoring
Diffstat (limited to 'kvmd')
-rw-r--r-- | kvmd/helpers/remount/__init__.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/kvmd/helpers/remount/__init__.py b/kvmd/helpers/remount/__init__.py index 28872206..960339f3 100644 --- a/kvmd/helpers/remount/__init__.py +++ b/kvmd/helpers/remount/__init__.py @@ -113,10 +113,9 @@ def main() -> None: storage = _find_storage(target) _remount(storage.mount_path, rw) - if rw: - if storage.root_path: - for name in dirs: - path = os.path.join(storage.root_path, name) - _mkdir(path) - if storage.user: - _chown(path, storage.user) + if rw and storage.root_path: + for name in dirs: + path = os.path.join(storage.root_path, name) + _mkdir(path) + if storage.user: + _chown(path, storage.user) |