NoTransaction#

class lsst.resources.utils.NoTransaction#

Bases: object

A simple emulation of the DatastoreTransaction class.

Notes#

Does nothing. Used as a fallback in the absence of an explicit transaction class.

Methods Summary

undoWith(name, undoFunc, *args, **kwargs)

No-op context manager to replace DatastoreTransaction.

Methods Documentation

undoWith(name: str, undoFunc: Callable, *args: Any, **kwargs: Any) Iterator[None]#

No-op context manager to replace DatastoreTransaction.

Parameters#

namestr

The name of this undo request.

undoFuncCallable

Function to call if there is an exception. Not used.

*argsAny

Parameters to pass to undoFunc.

**kwargsAny

Keyword parameters to pass to undoFunc.

Yields#

None

Context manager returns nothing since transactions are disabled by definition.