Made Logger methods accept BaseExceptions for exc_info (#1376)

Loggers accept any exceptions as the exc_info argument, not only Exception subclasses.
This commit is contained in:
Alex Grönholm
2017-06-01 06:00:56 +03:00
committed by Jelle Zijlstra
parent 193e6885d4
commit 37fc02ea7e

View File

@@ -13,7 +13,7 @@ import threading
_SysExcInfoType = Union[Tuple[type, BaseException, TracebackType],
Tuple[None, None, None]]
if sys.version_info >= (3, 5):
_ExcInfoType = Union[None, bool, _SysExcInfoType, Exception]
_ExcInfoType = Union[None, bool, _SysExcInfoType, BaseException]
else:
_ExcInfoType = Union[None, bool, _SysExcInfoType]
_ArgsType = Union[Tuple[Any, ...], Dict[str, Any]]