From: Sage Weil Date: Wed, 11 Dec 2019 16:59:24 +0000 (-0600) Subject: ceph.in: (py3) use binary stdout X-Git-Tag: v15.1.0~526^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F32187%2Fhead;p=ceph.git ceph.in: (py3) use binary stdout This fixes an error like $ ceph -s -o - Traceback (most recent call last): File "bin/ceph", line 1267, in retval = main() File "bin/ceph", line 1229, in main outf.write(outbuf) TypeError: write() argument must be str, not bytes Signed-off-by: Sage Weil --- diff --git a/src/ceph.in b/src/ceph.in index 3be7f4a672b99..70119d50a0446 100755 --- a/src/ceph.in +++ b/src/ceph.in @@ -1111,7 +1111,7 @@ def main(): if parsed_args.output_file: try: if parsed_args.output_file == '-': - outf = sys.stdout + outf = raw_stdout else: outf = open(parsed_args.output_file, 'wb') except Exception as e: