Rollback any changes done by :py:func:`signal_to_exception`.
513589
def exception_to_signal(sig: Union[SignalException, signal.Signals]):
    
    if isinstance(sig, SignalException):
        signum = sig.signum
    else:
        signum = sig.value
    signal.signal(signum, signal.SIG_DFL)
1350781
def rollback(self):
        
        if self.changed:
            rollback_cmd = '<load><config><from>{0}</from></config></load>'.format(self.backup_file)
            self.device.op(cmd=rollback_cmd)
            time.sleep(5)

            if self.ssh_connection is False:
                self._open_ssh()
            try:
                self.ssh_device.commit()
                self.loaded = False
                self.changed = False
                self.merge_config = False
            except:    # noqa
                ReplaceConfigException("Error while loading backup config")
938903
public function rollback()
    {
        if (!$this->recv) {
            $this->receive();
            App::error('You forget to getResult() before rollback !');
        }
        $this->connection->query('rollback;');
    }
290585
def fail(self) -> None:
        

        _debug("fail")

        # on commit carry out action; on rollback reverse rename
        def on_commit(_obj):
            raise_testfailure("commit")

        def on_rollback(_obj):
            raise_testfailure("rollback")

        return self._process(on_commit, on_rollback)
1022756
function rollback(client, done, error, callback) {
  client.query('ROLLBACK', rollbackError => {
    done(rollbackError);
    return callback(rollbackError || error, null);
  });
}
723702
def rollback(self, date):
        """"""
        if self.onOffset(date):
            return date
        else:
            return date - YearEnd(month=self.month)
716392
def rollback(self):
        """"""
        commands = []
        commands.append('configure replace flash:rollback-0')
        commands.append('write memory')
        self.device.run_commands(commands)
629836
def unregister_signals(self):
        """"""
        from .models import Collection
        from .percolator import collection_inserted_percolator, \
            collection_removed_percolator, collection_updated_percolator
        # Unregister Record signals
        if hasattr(self, 'update_function'):
            signals.before_record_insert.disconnect(self.update_function)
            signals.before_record_update.disconnect(self.update_function)
        # Unregister collection signals
        if contains(Collection, 'after_insert',
                    collection_inserted_percolator):
            remove(Collection, 'after_insert', collection_inserted_percolator)
            remove(Collection, 'after_update', collection_updated_percolator)
            remove(Collection, 'after_delete', collection_removed_percolator)
299719
def rollback(self):
        
        if hasattr(self.local, 'tx') and self.local.tx:
            tx = self.local.tx.pop()
            tx.rollback()
            self._flush_tables()
477368
async def rollback(self):
        """"""
        if not self._parent._is_active:
            return
        await self._do_rollback()
        self._is_active = False
1205399
protected function _rollBack()
    {
        $this->_connect();
        $this->_connection->rollback();
        $this->_connection->autocommit(true);
    }
1123216
def rollback(self):
        
        self.logger.info("Rolling back context: %s", self.initial_offsets)
        self.update_consumer_offsets(self.initial_offsets)
1318170
public function rollback()
    {
        // Ignore if no transaction
        if ($this->transactionDepth === 0) {
            return;
        }

        --$this->transactionDepth;
        unset($this->signalsQueue[$this->transactionCount]);
        --$this->transactionCount; // In case several rollbacks will happen on hierarchical transactions.
    }
943087
def rollback(self, transaction = None):
        """"""
        if not self.in_transaction:
            raise NotInTransaction
        for collection, store in self.stores.items():
            store.rollback()
            indexes = self.indexes[collection]
            indexes_to_rebuild = []
            for key, index in indexes.items():
                try:
                    index.rollback()
                except NotInTransaction:
                    # this index is "dirty" and needs to be rebuilt
                    # (probably it has been created within a transaction)
                    indexes_to_rebuild.append(key)
            if indexes_to_rebuild:
                self.rebuild_indexes(collection, indexes_to_rebuild)
        self.in_transaction = False
1295395
public static void rollback()
   {
      try {
         if (userTransaction.getStatus() != Status.STATUS_NO_TRANSACTION) {
            userTransaction.rollback();
         }
         else {
            LOGGER.warn("Request to rollback transaction when none was in started.");
         }
      }
      catch (Exception e) {
         LOGGER.warn("Transaction rollback failed.", e);
      }
   }
733942
def trigger_revert(force: false)
      rollback = Rollback.create!(
        user_id: user_id,
        stack_id: stack_id,
        parent_id: id,
        since_commit: until_commit,
        until_commit: since_commit,
        allow_concurrency: force,
      )
      rollback.enqueue
      lock_reason = "A rollback for #{until_commit.sha} has been triggered. " \
        "Please make sure the reason for the rollback has been addressed before deploying again."
      stack.update!(lock_reason: lock_reason, lock_author_id: user_id)
      rollback
    end
795410
def ignore_exception(exception_class):
    """"""
    def _decorator(func):
        def newfunc(*args, **kwds):
            try:
                return func(*args, **kwds)
            except exception_class:
                pass
        return newfunc
    return _decorator