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

@ -31,10 +31,10 @@ from nonebot.drivers import (
try:
import httpx
except ImportError: # pragma: no cover
except ImportError as e: # pragma: no cover
raise ImportError(
"Please install httpx by using `pip install nonebot2[httpx]`"
) from None
) from e
class Mixin(ForwardMixin):