Comment 6 for bug 1444983

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cliff (master)

Reviewed: https://review.openstack.org/201258
Committed: https://git.openstack.org/cgit/openstack/cliff/commit/?id=5d5aeb2f99410bd71904f92bf21fba7abf4ea284
Submitter: Jenkins
Branch: master

commit 5d5aeb2f99410bd71904f92bf21fba7abf4ea284
Author: Sean Perry <email address hidden>
Date: Mon Jul 13 09:00:28 2015 -0700

    Allow subcommands to accept --help when using 'deferred_help'.

    This patch changes how cliff handles help for subcommands but only when
    'deferred_help' is enabled. Currently cliff consumes --help requests at the top
    level. This means `myapp foo --help` and `myapp --help` produce the same output.
    To get help for `foo` one must use `myapp help foo`. With this change
    `myapp foo --help` will produce the same output as `myapp help foo` by
    transforming the --help request into a help subcommand one. This is only done
    when there are any options on the command line other than --help. When a top
    level --help is requested the original behavior of print_help_if_requested()
    is preserved.

    Change-Id: I628bbfc383de516045288512cc023213d723a027
    Closes-Bug: 1444983