diff options
author | Dan Mick <dan.mick@inktank.com> | 2013-08-05 18:18:59 -0700 |
---|---|---|
committer | Dan Mick <dan.mick@inktank.com> | 2013-08-08 09:38:04 -0700 |
commit | 0be14757e2ba8a26f0f29e46e58dab69efc1158a (patch) | |
tree | c57e0178392e290c8e9ac69547763b95d32c6d45 | |
parent | db27c3f5a367972cc5074eeae6ad805b59ce8dc9 (diff) | |
download | ceph-0be14757e2ba8a26f0f29e46e58dab69efc1158a.tar.gz |
ceph.in: Re-enable ceph interactive mode (missing its output).
Also, loop on error. There's no reason to exit the interpreter loop on
an error, and it's probably less annoying if we don't. Print the error,
and any output, and continue.
Fixes: #5746
Signed-off-by: Dan Mick <dan.mick@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 4dd9dfc37ae..102796dcf6b 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 |