import traceback
from io import BytesIO
-from six import StringIO
+from io import StringIO
from teuthology.exceptions import CommandFailedError
from teuthology import misc
os.path.join(self._prefix, "rados"), "-p", pool, "getxattr", obj_name, xattr_name
]
try:
- proc = remote.run(args=args, stdout=BytesIO())
+ proc = remote.run(args=args, stdout=StringIO())
except CommandFailedError as e:
log.error(e.__str__())
raise ObjectNotFound(obj_name)
"type", type,
"import", "-",
"decode", "dump_json"],
- stdin=data
+ stdin=data,
+ stdout=StringIO()
)
return json.loads(dump.strip())
-from io import BytesIO
from io import StringIO
import json
import time
'--',
self.mountpoint,
],
- stdout=BytesIO(),
- stderr=BytesIO(),
+ stdout=StringIO(),
+ stderr=StringIO(),
wait=False,
timeout=(15*60)
)
try:
proc.wait()
except CommandFailedError:
- error = six.ensure_str(proc.stderr.getvalue())
+ error = proc.stderr.getvalue()
if ("endpoint is not connected" in error
or "Software caused connection abort" in error):
# This happens is fuse is killed without unmount
# Now that we're mounted, set permissions so that the rest of the test will have
# unrestricted access to the filesystem mount.
try:
- stderr = BytesIO()
+ stderr = StringIO()
self.client_remote.run(args=['sudo', 'chmod', '1777', self.mountpoint], timeout=(15*60), stderr=stderr)
except run.CommandFailedError:
stderr = stderr.getvalue()
- if b"Read-only file system".lower() in stderr.lower():
+ if "Read-only file system".lower() in stderr.lower():
pass
else:
raise
""").format(self._fuse_conn))
self._fuse_conn = None
- stderr = BytesIO()
+ stderr = StringIO()
try:
# make sure its unmounted
self.client_remote.run(
Prerequisite: the client is not mounted.
"""
- stderr = BytesIO()
+ stderr = StringIO()
try:
self.client_remote.run(
args=[
timeout=(60*5)
)
except CommandFailedError:
- if b"No such file or directory" in stderr.getvalue():
+ if "No such file or directory" in stderr.getvalue():
pass
else:
raise