From 0be14757e2ba8a26f0f29e46e58dab69efc1158a Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Mon, 5 Aug 2013 18:18:59 -0700 Subject: [PATCH] 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 --- src/ceph.in | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ceph.in b/src/ceph.in index 4dd9dfc37ae3..102796dcf6bf 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 -- 2.47.3