diff options
author | Sage Weil <sage@inktank.com> | 2013-08-09 03:29:57 +0200 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-08-09 03:29:57 +0200 |
commit | f4aa05a44fc0e02ba3de359a662d126f721dba6e (patch) | |
tree | 03e5e2a3c5407e471bd48d15f9bf81e44c4d89e9 | |
parent | Merge pull request #488 from dmick/wip-dmick-daemon-einval (diff) | |
parent | ceph.in: Re-enable ceph interactive mode (missing its output). (diff) | |
download | ceph-f4aa05a44fc0e02ba3de359a662d126f721dba6e.tar.xz ceph-f4aa05a44fc0e02ba3de359a662d126f721dba6e.zip |
Merge pull request #487 from ceph/wip-5746
ceph.in: Re-enable ceph interactive mode (missing its output).
Reviewed-by: Sage Weil <sage@inktank.com>
-rwxr-xr-x | src/ceph.in | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ceph.in b/src/ceph.in index ed009577230..38150ed07d7 100755 --- a/src/ceph.in +++ b/src/ceph.in @@ -396,10 +396,15 @@ def new_style_command(parsed_args, cmdargs, target, sigdict, inbuf, verbose): target=target, argdict=valid_dict) if ret: - sys.stderr.write('Error {0}: {1}'.format(ret, outs)) - return ret, '', outs + ret = abs(ret) + print >> sys.stderr, \ + 'Error: {0} {1}'.format(ret, errno.errorcode[ret]) + if outbuf: + print outbuf + if outs: + print >> sys.stderr, 'Status:\n', outs else: - print "invalid command" + print >> sys.stderr, "Invalid command" if verbose: print >> sys.stderr, "Submitting command ", valid_dict |