]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph: fixup do_help() function connection check
authorGreg Farnum <greg@inktank.com>
Thu, 17 Oct 2013 23:45:06 +0000 (16:45 -0700)
committerSage Weil <sage@inktank.com>
Tue, 22 Oct 2013 19:33:03 +0000 (12:33 -0700)
We might have cluster_handle defined, but not have
successfully connected. Instead, check if it's in
the connected state.

Signed-off-by: Greg Farnum <greg@inktank.com>
src/ceph.in

index 15f5ff3764a5714fcfd43e82bbc0bc197df63e5a..8d4562ec94efcbdc05de7499b44c5defc81c1567 100755 (executable)
@@ -196,7 +196,7 @@ def do_help(parser, args):
     parser.print_help()
     print '\n'
 
-    if (cluster_handle):
+    if (cluster_handle.state == "connected"):
         help_for_target(target=('mon', ''), partial=partial)
 
     return 0