From c92d17dea21fbcf461716331ea7fd3500476edb9 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Sun, 10 Apr 2022 06:14:48 +0300 Subject: refactoring --- kvmd/helpers/remount/__init__.py | 13 ++++++------- 1 file 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) -- cgit v1.2.3