summaryrefslogtreecommitdiff
path: root/kvmd/plugins
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2023-03-16 15:10:53 +0200
committerMaxim Devaev <[email protected]>2023-03-16 15:10:53 +0200
commit59b1d8abbbb9225ec3164069acc74ec590b93f7b (patch)
treef84a91dace1d698dddc8a0659b654643ae96bae2 /kvmd/plugins
parent55cbd7fec8e55fc3801860c932392554d11656b7 (diff)
missing await
Diffstat (limited to 'kvmd/plugins')
-rw-r--r--kvmd/plugins/msd/otg/__init__.py4
1 files changed, 2 insertions, 2 deletions
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)