mirror of
https://github.com/EvolutionAPI/evolution-client-python.git
synced 2025-07-14 09:51:24 -06:00
12 lines
302 B
Python
12 lines
302 B
Python
import contextlib
|
|
|
|
|
|
def suppress_exceptions(callables, exceptions=Exception):
|
|
"""
|
|
yield the results of calling each element of callables, suppressing
|
|
any indicated exceptions.
|
|
"""
|
|
for callable in callables:
|
|
with contextlib.suppress(exceptions):
|
|
yield callable()
|