From 779d0de59ff4225e684848f5301f9e63c9e4bb70 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Sun, 24 Jul 2022 05:55:45 +0300 Subject: process cdrom/rw forbidden states in set_params() --- kvmd/plugins/msd/otg/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kvmd/plugins/msd/otg/__init__.py b/kvmd/plugins/msd/otg/__init__.py index 1149b39e..4bdd1359 100644 --- a/kvmd/plugins/msd/otg/__init__.py +++ b/kvmd/plugins/msd/otg/__init__.py @@ -290,9 +290,13 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes if cdrom is not None: self.__state.vd.cdrom = cdrom + if cdrom: + rw = False if rw is not None: self.__state.vd.rw = rw + if rw: + self.__state.vd.cdrom = False @aiotools.atomic async def set_connected(self, connected: bool) -> None: -- cgit v1.2.3