summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/ceph.in12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/ceph.in b/src/ceph.in
index 69608021f9b..c5ba2ce3d8a 100755
--- a/src/ceph.in
+++ b/src/ceph.in
@@ -1582,12 +1582,6 @@ def main():
if parsed_args.threshold:
childargs.extend(['--threshold', parsed_args.threshold])
ret, outbuf, outs = send_command(target, childargs, inbuf)
- # combine nonerror outbuf and outs; either may have cmd output
- if ret == 0:
- # old tool always added a newline
- outbuf = outs + '\n' + outbuf
- # clear outs so generic code below doesn't print it to stderr
- outs = ''
elif ret:
if ret < 0:
ret = -ret
@@ -1613,7 +1607,11 @@ def main():
# this assumes outs never has useful command output, only status
if outs:
- print >> sys.stderr, prefix, outs
+ if compat and ret == 0:
+ # old cli/mon would send status string to stdout on non-error
+ print outs
+ else:
+ print >> sys.stderr, prefix, outs
if (parsed_args.output_file):
outf.write(outbuf)