diff options
Diffstat (limited to 'kvmd/server.py')
-rw-r--r-- | kvmd/server.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kvmd/server.py b/kvmd/server.py index a4444ecc..efdb48c0 100644 --- a/kvmd/server.py +++ b/kvmd/server.py @@ -147,6 +147,7 @@ class Server: # pylint: disable=too-many-instance-attributes app.router.add_get("/msd", self.__msd_state_handler) app.router.add_post("/msd/connect", self.__msd_connect_handler) app.router.add_post("/msd/write", self.__msd_write_handler) + app.router.add_post("/msd/reset", self.__msd_reset_handler) app.router.add_get("/streamer", self.__streamer_state_handler) app.router.add_post("/streamer/set_params", self.__streamer_set_params_handler) @@ -298,6 +299,11 @@ class Server: # pylint: disable=too-many-instance-attributes logger.info("Written %d bytes to mass-storage device", written) return _json({"written": written}) + @_wrap_exceptions_for_web("Mass-storage error") + async def __msd_reset_handler(self, _: aiohttp.web.Request) -> aiohttp.web.Response: + await self.__msd.reset() + return _json() + # ===== STREAMER async def __streamer_state_handler(self, _: aiohttp.web.Request) -> aiohttp.web.Response: |