'Safely remove transaction from list'

def _remove(self, tr):

    try:
        self._transactions.remove(tr)
    except ValueError:
        log.warn('Tried    to    remove    transaction    %s    from    queue    but    it    was    not    in    the    queue    anymore.', tr.get_id())
    else:
        self._total_count -= 1
        self._total_size -= tr.get_size()
