From dbb9eda3416a79a26bb6b738aecab0c43c8c84e5 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Fri, 17 Mar 2023 23:41:59 +0200 Subject: refactoring --- kvmd/plugins/msd/otg/__init__.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'kvmd/plugins/msd/otg/__init__.py') diff --git a/kvmd/plugins/msd/otg/__init__.py b/kvmd/plugins/msd/otg/__init__.py index d8175975..d286fc84 100644 --- a/kvmd/plugins/msd/otg/__init__.py +++ b/kvmd/plugins/msd/otg/__init__.py @@ -417,11 +417,8 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes await asyncio.sleep(5) with Inotify() as inotify: - for path in [ - *self.__storage.get_watchable_paths(), - *self.__drive.get_watchable_paths(), - ]: - await inotify.watch(path, InotifyMask.ALL_MODIFY_EVENTS) + await inotify.watch(InotifyMask.ALL_MODIFY_EVENTS, *self.__storage.get_watchable_paths()) + await inotify.watch(InotifyMask.ALL_MODIFY_EVENTS, *self.__drive.get_watchable_paths()) # После установки вотчеров еще раз проверяем стейт, чтобы ничего не потерять await self.__reload_state() -- cgit v1.2.3