Ejemplo n.º 1
0
def _current_frame():
    if not is_active():
        raise RevisionManagementError("There is no active revision for this thread")
    return _local.stack[-1]
Ejemplo n.º 2
0
 def _assert_active(self):
     """Checks for an active revision, throwning an exception if none."""
     if not self.is_active():  # pragma: no cover
         raise RevisionManagementError(
             "There is no active revision for this thread")