From: Sage Weil Date: Tue, 22 Oct 2013 19:53:30 +0000 (-0700) Subject: ceph: show basic help before initializing cluster connection X-Git-Tag: v0.72-rc1~23^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d60e532e2829d421c2a369f6fc774c3e87b8952a;p=ceph.git ceph: show basic help before initializing cluster connection That way we still get help if there is an error. Signed-off-by: Sage Weil --- diff --git a/src/ceph.in b/src/ceph.in index 9e5110dc2297..6c528a474734 100755 --- a/src/ceph.in +++ b/src/ceph.in @@ -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}." 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