

def _transaction_ctx_for_context(context):
    by_thread = _transaction_contexts_by_thread(context)
    try:
        return by_thread.current
    except AttributeError:
        raise exception.NoEngineContextEstablished(('No TransactionContext is established for this %s object within the current thread. ' % context))

dataset/ETHPy150Open openstack/oslo.db/oslo_db/sqlalchemy/enginefacade.py _transaction_ctx_for_context/original