mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
reading images api
This commit is contained in:
@@ -76,6 +76,15 @@ class Plugin(BaseMsd):
|
||||
async def set_connected(self, connected: bool) -> None:
|
||||
raise MsdDisabledError()
|
||||
|
||||
@contextlib.asynccontextmanager
|
||||
async def read_image(self, name: str) -> AsyncGenerator[int, None]:
|
||||
if self is not None: # XXX: Vulture and pylint hack
|
||||
raise MsdDisabledError()
|
||||
yield 1
|
||||
|
||||
async def read_image_chunk(self) -> bytes:
|
||||
raise MsdDisabledError()
|
||||
|
||||
@contextlib.asynccontextmanager
|
||||
async def write_image(self, name: str, size: int) -> AsyncGenerator[int, None]:
|
||||
if self is not None: # XXX: Vulture and pylint hack
|
||||
|
||||
Reference in New Issue
Block a user