diff options
author | Maxim Devaev <[email protected]> | 2022-07-23 18:34:58 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-07-24 05:38:26 +0300 |
commit | 0e3ebac3627fe5039957d2d48d68d8620ff9384f (patch) | |
tree | 2792d2c261edffedf8bd8675f6ad8a5ea1bb56a3 /kvmd/plugins/msd/relay | |
parent | de140537254a517559c78de048791a197011c1f6 (diff) |
reading images api
Diffstat (limited to 'kvmd/plugins/msd/relay')
-rw-r--r-- | kvmd/plugins/msd/relay/__init__.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kvmd/plugins/msd/relay/__init__.py b/kvmd/plugins/msd/relay/__init__.py index 2cdc5796..2b45bce3 100644 --- a/kvmd/plugins/msd/relay/__init__.py +++ b/kvmd/plugins/msd/relay/__init__.py @@ -218,6 +218,17 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes self.__connected = connected @contextlib.asynccontextmanager + async def read_image(self, name: str) -> AsyncGenerator[int, None]: + async with self.__working(): + if self is not None: # XXX: Vulture and pylint hack + raise MsdMultiNotSupported() + yield 1 + + async def read_image_chunk(self) -> bytes: + async with self.__working(): + raise MsdMultiNotSupported() + + @contextlib.asynccontextmanager async def write_image(self, name: str, size: int) -> AsyncGenerator[int, None]: async with self.__working(): async with self.__region: |