Merge "Replace data structures' attribute with six module"
This commit is contained in:
commit
0d6d858805
@ -275,7 +275,7 @@ def _safe_log(log_func, msg, msg_data):
|
||||
|
||||
def _fix_passwords(d):
|
||||
"""Sanitizes the password fields in the dictionary."""
|
||||
for k in d.iterkeys():
|
||||
for k in six.iterkeys(d):
|
||||
if k.lower().find('password') != -1:
|
||||
d[k] = '<SANITIZED>'
|
||||
elif k.lower() in SANITIZE:
|
||||
|
@ -21,6 +21,7 @@ import time
|
||||
import eventlet
|
||||
import greenlet
|
||||
from oslo.config import cfg
|
||||
import six
|
||||
|
||||
from oslo.messaging._drivers import amqp as rpc_amqp
|
||||
from oslo.messaging._drivers import amqpdriver
|
||||
@ -523,7 +524,7 @@ class Connection(object):
|
||||
consumers = self.consumers
|
||||
self.consumers = {}
|
||||
|
||||
for consumer in consumers.itervalues():
|
||||
for consumer in six.itervalues(consumers):
|
||||
consumer.reconnect(self.session)
|
||||
self._register_consumer(consumer)
|
||||
|
||||
@ -681,7 +682,7 @@ class Connection(object):
|
||||
it = self.iterconsume(limit=limit, timeout=timeout)
|
||||
while True:
|
||||
try:
|
||||
it.next()
|
||||
six.next(it)
|
||||
except StopIteration:
|
||||
return
|
||||
|
||||
|
@ -27,6 +27,7 @@ import kombu.connection
|
||||
import kombu.entity
|
||||
import kombu.messaging
|
||||
from oslo.config import cfg
|
||||
import six
|
||||
|
||||
from oslo.messaging._drivers import amqp as rpc_amqp
|
||||
from oslo.messaging._drivers import amqpdriver
|
||||
@ -620,7 +621,7 @@ class Connection(object):
|
||||
|
||||
def _declare_consumer():
|
||||
consumer = consumer_cls(self.conf, self.channel, topic, callback,
|
||||
self.consumer_num.next())
|
||||
six.next(self.consumer_num))
|
||||
self.consumers.append(consumer)
|
||||
return consumer
|
||||
|
||||
@ -724,7 +725,7 @@ class Connection(object):
|
||||
it = self.iterconsume(limit=limit, timeout=timeout)
|
||||
while True:
|
||||
try:
|
||||
it.next()
|
||||
six.next(it)
|
||||
except StopIteration:
|
||||
return
|
||||
|
||||
|
@ -26,6 +26,7 @@ import uuid
|
||||
import eventlet
|
||||
import greenlet
|
||||
from oslo.config import cfg
|
||||
import six
|
||||
from six import moves
|
||||
|
||||
from oslo.messaging._drivers import base
|
||||
@ -531,8 +532,8 @@ def unflatten_envelope(packenv):
|
||||
h = {}
|
||||
try:
|
||||
while True:
|
||||
k = i.next()
|
||||
h[k] = i.next()
|
||||
k = six.next(i)
|
||||
h[k] = six.next(i)
|
||||
except StopIteration:
|
||||
return h
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user