in python3, the stuff read from wire is represented as "bytes", but
the output of "ceph -w" is supposed to be consumed by human. so decode
it as utf-8.
Signed-off-by: Kefu Chai <kchai@redhat.com>
# Filter on channel
if (channel == parsed_args.watch_channel or \
parsed_args.watch_channel == "*"):
- print(line)
+ print(line.decode('utf-8'))
sys.stdout.flush()
# first do a ceph status
if ret:
print("status query failed: ", outs, file=sys.stderr)
return ret
- print(outbuf)
+ print(outbuf.decode('utf-8'))
# this instance keeps the watch connection alive, but is
# otherwise unused