Remove six.moves module

Python 3 reorganized the standard library and moved several functions to
different modules. Six provides a consistent interface to them through the
fake six.moves module.

But six.StringIO is an alias for StringIO.StringIO in Python 2 and
io.StringIO in Python 3. So we don't need six.moves.StringIO() any more,
we use six.StringIO() directly.

Here is links :http://pythonhosted.org/six/#module-six.moves

Change-Id: I44dbe915820ba4b5ffc0e34812fadc3d905542d1
This commit is contained in:
Lu lei
2016-09-07 16:50:06 +08:00
parent 2b10182d3c
commit a8b55ac0ce

View File

@@ -20,14 +20,13 @@ from heatclient.common import template_utils
from senlinclient.common import exc
from senlinclient.common.i18n import _
from senlinclient.common import utils
from six import moves
class CaptureStdout(object):
"""Context manager for capturing stdout from statements in its block."""
def __enter__(self):
self.real_stdout = sys.stdout
self.stringio = moves.StringIO()
self.stringio = six.StringIO()
sys.stdout = self.stringio
return self