[utils] Skip missing params in cli_bool_option (closes #13865)
This commit is contained in:
parent
4bf22f7a10
commit
5b232f46dc
2 changed files with 6 additions and 0 deletions
|
@ -2733,6 +2733,8 @@ def cli_option(params, command_option, param):
|
|||
|
||||
def cli_bool_option(params, command_option, param, true_value='true', false_value='false', separator=None):
|
||||
param = params.get(param)
|
||||
if param is None:
|
||||
return []
|
||||
assert isinstance(param, bool)
|
||||
if separator:
|
||||
return [command_option + separator + (true_value if param else false_value)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue