lisa.utils.ignore_exceps#

lisa.utils.ignore_exceps(exceps, cm, callback=None)[source]#

Wrap a context manager and handle exceptions raised in __enter__() and __exit__().

Parameters:

exceps (BaseException or tuple(BaseException)) – Tuple of exceptions to catch.

Note

If the __enter__() method failed, __exit__() will not be called.