diff options
author | Devaev Maxim <[email protected]> | 2020-03-16 02:32:19 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-03-16 02:42:23 +0300 |
commit | 966267ebb9a89e1898c6009c7e85e5f837109aef (patch) | |
tree | 0b246895685545393352e5d821363883d099c560 /kvmd/apps | |
parent | 5b58af4d6f433fcbf16e967404a5cd85a85eefba (diff) |
asyncio.CancelledError is a subclass of BaseException since 3.8
Diffstat (limited to 'kvmd/apps')
-rw-r--r-- | kvmd/apps/kvmd/server.py | 2 | ||||
-rw-r--r-- | kvmd/apps/kvmd/streamer.py | 2 |
2 files changed, 0 insertions, 4 deletions
diff --git a/kvmd/apps/kvmd/server.py b/kvmd/apps/kvmd/server.py index 2d70d4b6..a965757c 100644 --- a/kvmd/apps/kvmd/server.py +++ b/kvmd/apps/kvmd/server.py @@ -397,8 +397,6 @@ class KvmdServer(HttpServer): # pylint: disable=too-many-arguments,too-many-ins remote: Optional[str] = (ws._req.remote if ws._req is not None else None) # pylint: disable=protected-access get_logger().info("Removed client socket: remote=%s; id=%d; active=%d", remote, id(ws), len(self.__sockets)) await ws.close() - except asyncio.CancelledError: # pylint: disable=try-except-raise - raise except Exception: pass await self.__streamer_notifier.notify() diff --git a/kvmd/apps/kvmd/streamer.py b/kvmd/apps/kvmd/streamer.py index fec05987..f5bd6b1f 100644 --- a/kvmd/apps/kvmd/streamer.py +++ b/kvmd/apps/kvmd/streamer.py @@ -187,8 +187,6 @@ class Streamer: # pylint: disable=too-many-instance-attributes state = (await response.json())["result"] except (aiohttp.ClientConnectionError, aiohttp.ServerConnectionError): pass - except asyncio.CancelledError: # pylint: disable=try-except-raise - raise except Exception: get_logger().exception("Invalid streamer response from /state") return { |