mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
[PR #8512/ec4cf555 backport][stable-9] simplify cmd_runner_fmt.as_bool_not() (#8515)
simplify cmd_runner_fmt.as_bool_not() (#8512)
* simplify cmd_runner_fmt.as_bool_not()
* add changelog frag
(cherry picked from commit ec4cf55566)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
@@ -127,7 +127,7 @@ class _Format(object):
|
||||
|
||||
@staticmethod
|
||||
def as_bool_not(args):
|
||||
return _ArgFormat(lambda value: [] if value else _ensure_list(args), ignore_none=False)
|
||||
return _Format.as_bool([], args, ignore_none=False)
|
||||
|
||||
@staticmethod
|
||||
def as_optval(arg, ignore_none=None):
|
||||
|
||||
Reference in New Issue
Block a user