mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-31 18:11:54 +08:00
asyncio.CancelledError is a subclass of BaseException since 3.8
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user