diff options
author | Devaev Maxim <[email protected]> | 2018-07-03 00:43:31 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2018-07-03 00:43:31 +0300 |
commit | c4d861cc35751c52794c699ed4a24b610fabb046 (patch) | |
tree | 2c25dd8039c25e97c318b8797a42ba1fe365284d | |
parent | 8fd506fa1b0a38d67c9c3250ab9f78bdde5abae9 (diff) |
pc -> server
-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()) |