Use raise from e when load driver error (#1689)

This commit is contained in:
scdhh
2023-02-09 10:24:27 +08:00
committed by GitHub
parent 720c736343
commit 4c0d4065c5
5 changed files with 10 additions and 10 deletions

View File

@ -37,10 +37,10 @@ try:
from quart import Quart, Request, Response
from quart.datastructures import FileStorage
from quart import Websocket as QuartWebSocket
except ImportError: # pragma: no cover
except ImportError as e: # pragma: no cover
raise ImportError(
"Please install Quart by using `pip install nonebot2[quart]`"
) from None
) from e
_AsyncCallable = TypeVar("_AsyncCallable", bound=Callable[..., Coroutine])