diff options
author | Sage Weil <sage@inktank.com> | 2013-10-22 12:53:30 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-10-22 12:53:30 -0700 |
commit | d60e532e2829d421c2a369f6fc774c3e87b8952a (patch) | |
tree | 36e45b01202919d1192ca201060946ea888f6fe3 | |
parent | b33c3158d4fdd1829bebe1b8ccb99377b753e5a8 (diff) | |
download | ceph-d60e532e2829d421c2a369f6fc774c3e87b8952a.tar.gz |
ceph: show basic help before initializing cluster connection
That way we still get help if there is an error.
Signed-off-by: Sage Weil <sage@inktank.com>
-rwxr-xr-x | src/ceph.in | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/ceph.in b/src/ceph.in index 9e5110dc229..6c528a47473 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}.<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 |