Merge "python3: python3 binary/text data compatbility"
This commit is contained in:
commit
74733fc3fe
|
@ -19,9 +19,10 @@ from __future__ import print_function
|
|||
|
||||
import fixtures
|
||||
import os
|
||||
import StringIO
|
||||
import tempfile
|
||||
|
||||
from six import StringIO
|
||||
|
||||
from openstack.common import processutils
|
||||
from tests import utils
|
||||
|
||||
|
@ -213,7 +214,7 @@ class FakeSshChannel(object):
|
|||
return self.rc
|
||||
|
||||
|
||||
class FakeSshStream(StringIO.StringIO):
|
||||
class FakeSshStream(StringIO):
|
||||
def setup_channel(self, rc):
|
||||
self.channel = FakeSshChannel(rc)
|
||||
|
||||
|
@ -225,9 +226,9 @@ class FakeSshConnection(object):
|
|||
def exec_command(self, cmd):
|
||||
stdout = FakeSshStream('stdout')
|
||||
stdout.setup_channel(self.rc)
|
||||
return (StringIO.StringIO(),
|
||||
return (StringIO(),
|
||||
stdout,
|
||||
StringIO.StringIO('stderr'))
|
||||
StringIO('stderr'))
|
||||
|
||||
|
||||
class SshExecuteTestCase(utils.BaseTestCase):
|
||||
|
|
Loading…
Reference in New Issue