]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph: show basic help before initializing cluster connection
authorSage Weil <sage@inktank.com>
Tue, 22 Oct 2013 19:53:30 +0000 (12:53 -0700)
committerSage Weil <sage@inktank.com>
Tue, 22 Oct 2013 19:53:30 +0000 (12:53 -0700)
That way we still get help if there is an error.

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

index 9e5110dc2297d12eaed79ed72f4e3ff52de3ac84..6c528a474734d29861776358ea03f4b94cdc176d 100755 (executable)
@@ -544,6 +544,14 @@ def main():
             return errno.EINVAL
         return 0
 
+    # basic help
+    timeout = None
+    if parsed_args.cluster_timeout:
+        timeout = parsed_args.cluster_timeout
+
+    if parsed_args.help:
+        do_basic_help(parser, childargs)
+
     # handle any 'generic' ceph arguments that we didn't parse here
     global cluster_handle
 
@@ -581,14 +589,7 @@ def main():
         print >> sys.stderr, '"{0} tell" is deprecated; try "tell {0}.<id>" instead (id can be "*") '.format(childargs[0])
         return 1
 
-
-    timeout = None
-    if parsed_args.cluster_timeout:
-        timeout = parsed_args.cluster_timeout
-
     if parsed_args.help:
-        do_basic_help(parser, childargs)
-
         # short default timeout for -h
         if not timeout:
             timeout = 5