transactional

lsst.daf.butler.core.utils.transactional(func)

Decorator that wraps a method and makes it transactional.

This also adds an optional transactional keyword argument to the decorated function, which can be set to False to disable method-level transactions. This can be useful when the method is being called within a higher-level transaction block but exceptions it raises will be caught before they propagate through the higher-level context manager.