Feature: 重构驱动器 lifespan 方法 (#1860)

This commit is contained in:
Ju4tCode
2023-03-29 15:59:54 +08:00
committed by GitHub
parent 0d0bc656c8
commit a8a76393a5
8 changed files with 126 additions and 52 deletions

View File

@ -30,7 +30,7 @@ from nonebot.drivers import ForwardMixin, ForwardDriver, combine_driver
try:
from websockets.exceptions import ConnectionClosed
from websockets.legacy.client import Connect, WebSocketClientProtocol
except ImportError as e: # pragma: no cover
except ModuleNotFoundError as e: # pragma: no cover
raise ImportError(
"Please install websockets by using `pip install nonebot2[websockets]`"
) from e