From 59b1d8abbbb9225ec3164069acc74ec590b93f7b Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Thu, 16 Mar 2023 15:10:53 +0200 Subject: missing await --- kvmd/plugins/msd/otg/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kvmd/plugins/msd/otg') diff --git a/kvmd/plugins/msd/otg/__init__.py b/kvmd/plugins/msd/otg/__init__.py index 51b9ca75..ddb90a79 100644 --- a/kvmd/plugins/msd/otg/__init__.py +++ b/kvmd/plugins/msd/otg/__init__.py @@ -489,7 +489,7 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes self.__state.vd = _VirtualDriveState.from_drive_state(drive_state) image = self.__state.vd.image - if image and (not image.in_storage or not image.exists()): + if image and (not image.in_storage or not (await image.exists())): # Если только что отключили ручной образ вне хранилища или ранее выбранный образ был удален self.__state.vd.image = None @@ -501,7 +501,7 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes if self.__initial_image: logger = get_logger(0) image = self.__storage.get_image_by_name(self.__initial_image) - if image.exists(): + if (await image.exists()): logger.info("Setting up initial image %r ...", self.__initial_image) try: self.__drive.set_rw_flag(False) -- cgit v1.2.3