]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.in: assert(state==connected) before help_for_target() 15156/head
authorKefu Chai <kchai@redhat.com>
Thu, 18 May 2017 05:03:59 +0000 (13:03 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 18 May 2017 12:03:10 +0000 (20:03 +0800)
we always call "cluster_handle.connect()", and error out if connect()
fails.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/ceph.in

index 89b52cecc5bcb666a2c480a75d85a15d8cefe61a..75547827137c0bc695df1e588a9500164f065891 100755 (executable)
@@ -303,8 +303,8 @@ def do_extended_help(parser, args):
             help_for_sigs(outbuf.decode('utf-8'), partial)
 
     partial = ' '.join(args)
-    if (cluster_handle.state == "connected"):
-        help_for_target(target=('mon', ''), partial=partial)
+    assert(cluster_handle.state == "connected")
+    help_for_target(target=('mon', ''), partial=partial)
     return 0
 
 DONTSPLIT = string.ascii_letters + '{[<>]}'