as callers of `TestForwardScrub._read_str_xattr()` expects str.
Signed-off-by: Kefu Chai <kchai@redhat.com>
import json
import logging
+import six
+
from collections import namedtuple
from io import BytesIO
from textwrap import dedent
output = self.fs.rados(["getxattr", obj, attr], pool=pool,
stdout_data=BytesIO())
strlen = struct.unpack('i', output[0:4])[0]
- return output[4:(4 + strlen)]
+ return six.ensure_str(output[4:(4 + strlen)], encoding='ascii')
def _get_paths_to_ino(self):
inos = {}