Merge "Unify different names between Python2/3 with six.moves"

This commit is contained in:
Jenkins 2013-11-28 15:51:40 +00:00 committed by Gerrit Code Review
commit 9feea9c15e
2 changed files with 4 additions and 2 deletions

View File

@ -349,7 +349,7 @@ class JSONFormatter(logging.Formatter):
def formatException(self, ei, strip_newlines=True):
lines = traceback.format_exception(*ei)
if strip_newlines:
lines = [itertools.ifilter(
lines = [moves.filter(
lambda x: x,
line.rstrip().splitlines()) for line in lines]
lines = list(itertools.chain(*lines))

View File

@ -15,6 +15,8 @@
import threading
from six import moves
from openstack.common import local
from openstack.common import test
@ -36,7 +38,7 @@ class LocalStoreTestCase(test.BaseTestCase):
# testing in (eventlet vs normal python threading) so
# we test the correct type of local store for the current
# threading model
reload(local)
moves.reload_module(local)
def test_thread_unique_storage(self):
"""Make sure local store holds thread specific values."""