]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph: error out properly when failing to get commands
authorSage Weil <sage@inktank.com>
Sun, 16 Jun 2013 23:48:27 +0000 (16:48 -0700)
committerSage Weil <sage@inktank.com>
Sun, 16 Jun 2013 23:48:27 +0000 (16:48 -0700)
If we make ret positive here we miss the failure check below.  Instead,
just set outs appropriately.

Signed-off-by: Sage Weil <sage@inktank.com>
src/ceph.in

index c5ba2ce3d8aa0d43e42d486f653d8eee18bc5c05..40b3a8f8674164945fb3c5dcd799cb3cae80bda9 100755 (executable)
@@ -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)