From 1ab433575166c365e544674e79d7ad5d982ccce0 Mon Sep 17 00:00:00 2001 From: He Yongli Date: Mon, 17 Feb 2014 14:34:45 +0800 Subject: [PATCH] Use six.moves cStringIO instead of cStringIO to keep Python 3.x compatibility, use six.moves.cStringIO to replace StringIO Change-Id: Ib6dcd06ca8c9342d26f3b7b738c99d23433d7f30 Closes-Bug: #1280964 --- neutronclient/tests/unit/test_shell.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neutronclient/tests/unit/test_shell.py b/neutronclient/tests/unit/test_shell.py index 499e13821..f79a09910 100644 --- a/neutronclient/tests/unit/test_shell.py +++ b/neutronclient/tests/unit/test_shell.py @@ -71,8 +71,8 @@ class ShellTest(testtools.TestCase): clean_env = {} _old_env, os.environ = os.environ, clean_env.copy() try: - sys.stdout = six.StringIO() - sys.stderr = six.StringIO() + sys.stdout = six.moves.cStringIO() + sys.stderr = six.moves.cStringIO() _shell = openstack_shell.NeutronShell('2.0') _shell.run(argstr.split()) except SystemExit: