os.path.join(self._prefix, "rados"), "-p", pool, "getxattr", obj_name, xattr_name
]
try:
- proc = remote.run(args=args, stdout=StringIO())
+ proc = remote.run(args=args, stdout=BytesIO())
except CommandFailedError as e:
log.error(e.__str__())
raise ObjectNotFound(obj_name)
env=env)
if stdin:
- if not isinstance(stdin, str):
- raise RuntimeError("Can't handle non-string stdins on a vstart cluster")
-
# Hack: writing to stdin is not deadlock-safe, but it "always" works
# as long as the input buffer is "small"
- subproc.stdin.write(stdin.encode())
+ if isinstance(stdin, str):
+ subproc.stdin.write(stdin.encode())
+ else:
+ subproc.stdin.write(stdin)
proc = LocalRemoteProcess(
args, subproc, check_status,