@gen.coroutine
  def _AbortOp(self, op, type, value, tb):
    """The given operation has failed in such a way that we know it will never succeed so we
    will abort it.  If it modified the DB before the failure, we log an error with callstack
    of db modification and call retry logic so that it sticks around in operation table for
    analysis.
    """
    # Did we make any modifications to the db before hitting an abortable error?
    if self._client.HasDBBeenModified():
      # If so, let's dump some information into the log about where this happened.
      stackDumpLines = ''.join(traceback.format_list(self._client.GetModifiedDBStack()))
      logging.error('Database modified before abortable exception was raised: %s' % stackDumpLines)

      # Now, go to the failure logic.
      yield self._FailOp(op, type, value, tb)
    else:
      elapsed_secs = op.timestamp - time.time()
      logging.warning('ABORT: user: %d, device: %d, op: %s, method: %s in %.3fs, %s' %
                      (op.user_id, op.device_id, op.operation_id, op.method, elapsed_secs, value))
      _avg_op_time.add(elapsed_secs)
      _aborts_per_min.increment()

      # Fully abort the op, with no possibility of retry.
      yield self._DeleteOp(op)
dataset/ETHPy150Open viewfinderco/viewfinder/backend/op/user_op_manager.py/UserOpManager._AbortOp/swapped operands of `-`