diff options
-rw-r--r-- | kvmd/kvmd/msd.py | 6 | ||||
-rw-r--r-- | kvmd/kvmd/server.py | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/kvmd/kvmd/msd.py b/kvmd/kvmd/msd.py index 9151f25e..d40927e4 100644 --- a/kvmd/kvmd/msd.py +++ b/kvmd/kvmd/msd.py @@ -30,7 +30,7 @@ class IsNotOperationalError(MassStorageError): class AlreadyConnectedToPcError(MassStorageError): def __init__(self) -> None: - super().__init__("Mass-storage is already connected to PC") + super().__init__("Mass-storage is already connected to Server") class AlreadyConnectedToKvmError(MassStorageError): @@ -180,12 +180,12 @@ class MassStorageDevice: # pylint: disable=too-many-instance-attributes raise AlreadyConnectedToPcError() # TODO: enable gpio self.__device_info = None - get_logger().info("Mass-storage device switched to PC") + get_logger().info("Mass-storage device switched to Server") def get_state(self) -> Dict: return { "in_operate": bool(self._bind), - "connected_to": ("kvm" if self.__device_info else "pc"), + "connected_to": ("kvm" if self.__device_info else "server"), "is_busy": bool(self._device_file), "writed": self.__writed, "info": (self.__device_info._asdict() if self.__device_info else None), diff --git a/kvmd/kvmd/server.py b/kvmd/kvmd/server.py index 6144e1a1..fedc1b07 100644 --- a/kvmd/kvmd/server.py +++ b/kvmd/kvmd/server.py @@ -159,9 +159,9 @@ class Server: # pylint: disable=too-many-instance-attributes if to == "kvm": await self.__msd.connect_to_kvm() await self.__broadcast_event("msd_state", state="connected_to_kvm") # type: ignore - elif to == "pc": + elif to == "server": await self.__msd.connect_to_pc() - await self.__broadcast_event("msd_state", state="connected_to_pc") # type: ignore + await self.__broadcast_event("msd_state", state="connected_to_server") # type: ignore else: raise RuntimeError("Missing or invalid 'to=%s'" % (to)) return _json_200(self.__msd.get_state()) |