From: Sage Weil Date: Sun, 16 Jun 2013 23:48:27 +0000 (-0700) Subject: ceph: error out properly when failing to get commands X-Git-Tag: v0.65~55 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=84d1847f506f1f39dd0929fcff38a13bd5285d3f;p=ceph.git ceph: error out properly when failing to get commands If we make ret positive here we miss the failure check below. Instead, just set outs appropriately. Signed-off-by: Sage Weil --- diff --git a/src/ceph.in b/src/ceph.in index c5ba2ce3d8aa0..40b3a8f867416 100755 --- a/src/ceph.in +++ b/src/ceph.in @@ -1584,10 +1584,7 @@ def main(): ret, outbuf, outs = send_command(target, childargs, inbuf) elif ret: if ret < 0: - ret = -ret - print >> sys.stderr, prefix, \ - 'Problem getting command descriptions from {0}, {1}'.\ - format(target, errno.errorcode[ret]) + outs = 'problem getting command descriptions from {0}.{1}'.format(*target) else: sigdict = parse_json_funcsigs(outbuf)