Skip to content

Commit

Permalink
Skip mutually exclusive cli options with broken associations
Browse files Browse the repository at this point in the history
  • Loading branch information
Tejeda, Engelbert committed Sep 27, 2019
1 parent d654bc1 commit ebe1cb4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ansible_taskrunner/lib/click_extras/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ def process_options(self, parameters, func, is_required=False):
cli_option = cli_option_l[0]
opt_option = cli_option_l[1]
opt_option_value = parameters.get(opt_option, '')
if not opt_option_value:
logger.warning('Skipping mutually exclusive option %s due to possible broken association' % opt_option)
continue
#If a given option is mutually exclusive with another,
#then whether or not it is required depends on the
#command-line invocation relating
Expand Down

0 comments on commit ebe1cb4

Please sign in to comment.