mirror of
https://github.com/lilydjwg/nvchecker
synced 2025-01-09 15:59:30 +00:00
fix tests trying to raise exc_info=True
This commit is contained in:
parent
8b32c26d1e
commit
914c6414e8
@ -82,7 +82,11 @@ def raise_on_logger_msg():
|
||||
def proc(logger, method_name, event_dict):
|
||||
if method_name in ('warning', 'error'):
|
||||
if 'exc_info' in event_dict:
|
||||
raise event_dict['exc_info']
|
||||
exc = event_dict['exc_info']
|
||||
if isinstance(exc, Exception):
|
||||
raise exc
|
||||
else: # exc_info=True
|
||||
raise
|
||||
if not event_dict['event'].startswith(('rate limited', 'no-result')):
|
||||
raise RuntimeError(event_dict['event'])
|
||||
return event_dict['event']
|
||||
|
Loading…
Reference in New Issue
Block a user