diff options
author | Maxim Devaev <[email protected]> | 2022-08-03 19:44:08 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-08-03 19:44:08 +0300 |
commit | 9925198762ab355343eb759e8117827a17645508 (patch) | |
tree | 99baab39d3655f96592c07966d696f469ccb6c62 /kvmd/plugins/msd/disabled.py | |
parent | 0809daa199345c84646ad813a527eac5bc4fa728 (diff) |
refactored msd reader api
Diffstat (limited to 'kvmd/plugins/msd/disabled.py')
-rw-r--r-- | kvmd/plugins/msd/disabled.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/kvmd/plugins/msd/disabled.py b/kvmd/plugins/msd/disabled.py index 3a8c1b2e..5317fb09 100644 --- a/kvmd/plugins/msd/disabled.py +++ b/kvmd/plugins/msd/disabled.py @@ -29,6 +29,7 @@ from typing import Optional from ... import aiotools from . import MsdOperationError +from . import BaseMsdReader from . import BaseMsd @@ -77,13 +78,10 @@ class Plugin(BaseMsd): raise MsdDisabledError() @contextlib.asynccontextmanager - async def read_image(self, name: str) -> AsyncGenerator[int, None]: + async def read_image(self, name: str) -> AsyncGenerator[BaseMsdReader, None]: if self is not None: # XXX: Vulture and pylint hack raise MsdDisabledError() - yield 1 - - async def read_image_chunk(self) -> bytes: - raise MsdDisabledError() + yield BaseMsdReader() @contextlib.asynccontextmanager async def write_image(self, name: str, size: int, remove_incomplete: Optional[bool]) -> AsyncGenerator[int, None]: |