diff options
-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 |