From: Dan Mick Date: Tue, 6 Aug 2013 01:18:59 +0000 (-0700) Subject: ceph.in: Re-enable ceph interactive mode (missing its output). X-Git-Tag: v0.67~13^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0be14757e2ba8a26f0f29e46e58dab69efc1158a;p=ceph.git 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 --- 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