summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-07-24 05:55:45 +0300
committerMaxim Devaev <[email protected]>2022-07-24 05:55:54 +0300
commit779d0de59ff4225e684848f5301f9e63c9e4bb70 (patch)
tree7c9e5abe69830a5609ad87dbd911fcc395f20cff
parent88b2e90438c861ead6f131b5987eb4348f004ec6 (diff)
process cdrom/rw forbidden states in set_params()
-rw-r--r--kvmd/plugins/msd/otg/__init__.py4
1 files changed, 4 insertions, 0 deletions
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: