diff options
Diffstat (limited to 'kvmd/plugins')
-rw-r--r-- | kvmd/plugins/msd/__init__.py | 8 | ||||
-rw-r--r-- | kvmd/plugins/msd/disabled.py | 3 | ||||
-rw-r--r-- | kvmd/plugins/msd/relay.py | 2 |
3 files changed, 5 insertions, 8 deletions
diff --git a/kvmd/plugins/msd/__init__.py b/kvmd/plugins/msd/__init__.py index 95c0f0d0..6edc6ecb 100644 --- a/kvmd/plugins/msd/__init__.py +++ b/kvmd/plugins/msd/__init__.py @@ -94,8 +94,7 @@ class BaseMsd(BasePlugin): raise NotImplementedError() async def poll_state(self) -> AsyncGenerator[Dict, None]: - if True: # pylint: disable=using-constant-test - # XXX: Vulture hack + if self is not None: # XXX: Vulture and pylint hack raise NotImplementedError() yield @@ -117,9 +116,8 @@ class BaseMsd(BasePlugin): raise NotImplementedError() @contextlib.asynccontextmanager - async def write_image(self, name: str) -> AsyncGenerator[None, None]: - if True: # pylint: disable=using-constant-test - # XXX: Vulture hack + async def write_image(self, name: str) -> AsyncGenerator[None, None]: # pylint: disable=unused-argument + if self is not None: # XXX: Vulture and pylint hack raise NotImplementedError() yield diff --git a/kvmd/plugins/msd/disabled.py b/kvmd/plugins/msd/disabled.py index 4dacf1e4..179af7da 100644 --- a/kvmd/plugins/msd/disabled.py +++ b/kvmd/plugins/msd/disabled.py @@ -74,8 +74,7 @@ class Plugin(BaseMsd): @contextlib.asynccontextmanager async def write_image(self, name: str) -> AsyncGenerator[None, None]: - if True: # pylint: disable=using-constant-test - # XXX: Vulture hack + if self is not None: # XXX: Vulture and pylint hack raise MsdDisabledError() yield diff --git a/kvmd/plugins/msd/relay.py b/kvmd/plugins/msd/relay.py index 09a8710e..43baeadc 100644 --- a/kvmd/plugins/msd/relay.py +++ b/kvmd/plugins/msd/relay.py @@ -127,7 +127,7 @@ def _parse_image_info_bytes(data: bytes) -> Optional[_ImageInfo]: def _ioctl_uint32(device_file: IO, request: int) -> int: buf = b"\0" * 4 - buf = fcntl.ioctl(device_file.fileno(), request, buf) + buf = fcntl.ioctl(device_file.fileno(), request, buf) # type: ignore result = struct.unpack("I", buf)[0] assert result > 0, (device_file, request, buf) return result |