Merge "py3: Replaces xrange() with six.moves.range()"
This commit is contained in:
commit
2ae5196747
@ -143,7 +143,7 @@ class PikaPoller(object):
|
||||
LOG.exception("Unexpected error during closing connection")
|
||||
self._connection = None
|
||||
|
||||
for i in xrange(len(self._message_queue) - 1, -1, -1):
|
||||
for i in six.moves.range(len(self._message_queue) - 1, -1, -1):
|
||||
message = self._message_queue[i]
|
||||
if message.need_ack():
|
||||
del self._message_queue[i]
|
||||
|
@ -20,6 +20,7 @@ import itertools
|
||||
import logging
|
||||
import os
|
||||
import random
|
||||
import six
|
||||
import string
|
||||
import sys
|
||||
import threading
|
||||
@ -274,7 +275,7 @@ def send_msg(c_id, transport, target, wait_after_msg, timeout, is_cast,
|
||||
client.send_msg()
|
||||
else:
|
||||
LOG.debug("Sending %d messages using client %d", messages_count, c_id)
|
||||
for _ in xrange(0, messages_count):
|
||||
for _ in six.moves.range(0, messages_count):
|
||||
client.send_msg()
|
||||
LOG.debug("Client %d has sent %d messages", c_id, messages_count)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user