diff --git a/oslo_concurrency/processutils.py b/oslo_concurrency/processutils.py index 3ccbced..53a2d70 100644 --- a/oslo_concurrency/processutils.py +++ b/oslo_concurrency/processutils.py @@ -575,9 +575,9 @@ def ssh_execute(ssh, cmd, process_input=None, # to decode it, or an Unicode string otherwise. Encode to the # default encoding (ASCII) because mask_password() decodes from # the same encoding. - if isinstance(stdout, unicode): + if isinstance(stdout, six.text_type): stdout = stdout.encode() - if isinstance(stderr, unicode): + if isinstance(stderr, six.text_type): stderr = stderr.encode() else: # fsencode() is the reverse operation of fsdecode() diff --git a/tox.ini b/tox.ini index d004f41..a3174e5 100644 --- a/tox.ini +++ b/tox.ini @@ -14,6 +14,7 @@ commands = env TEST_EVENTLET=1 lockutils-wrapper python setup.py testr --slowest --testr-args='{posargs}' [testenv:pep8] +basepython = python3 deps = -r{toxinidir}/test-requirements.txt commands =