Running Callbacks¶
pcapkit.utilities.callbacks holds run_callbacks(), which calls every
registered callback whatever an earlier one raised. Reassembly and flow tracing run
their callbacks through it, so both follow the ruling recorded on
Reassembly Integration (#2881). It behaves the same on every
interpreter, so it is not in compat; see
Choosing Between utilities and corekit.
Added in version 1.7.0.
- pcapkit.utilities.callbacks.run_callbacks(callbacks, argument, *, logger, subject)[source]¶
Call each callback with
argument, every one whatever the others raise.- Parameters:
- Raises:
Exception – The first
Exceptiona callback raised, once the last has run.- Return type:
One raising an
Exceptiondoes not stop the rest: the first such error is re-raised once all have run, and a later one logged at debug level with its traceback. Any otherBaseExceptionpropagates at once, dropping an earlier error.