import tempfile
import sys
-from io import BytesIO
+from io import StringIO
from teuthology.orchestra import run
from teuthology import misc as teuthology
from teuthology import contextutil
representing the given role. A canonical path contains no
. or .. components, and includes no symbolic links.
"""
- version_fp = BytesIO()
+ version_fp = StringIO()
ctx.cluster.only(role).run(
args=[ 'readlink', '-f', path ],
stdout=version_fp,
)
- canonical_path = six.ensure_str(version_fp.getvalue()).rstrip('\n')
+ canonical_path = version_fp.getvalue().rstrip('\n')
version_fp.close()
return canonical_path