From 9799e6c45dc86870bc2bcefa0aaa9bb01a6cd18a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 11 Dec 2019 10:59:24 -0600 Subject: [PATCH] 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 --- src/ceph.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- 2.47.3