mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Refactor to replace filter and lambda with a generator expression
This commit is contained in:
parent
dac562a132
commit
1ae28f606b
1 changed files with 1 additions and 1 deletions
|
@ -291,7 +291,7 @@ class TaskExecutor:
|
|||
# And filter out any fields which were set to default(omit), and got the omit token value
|
||||
omit_token = variables.get('omit')
|
||||
if omit_token is not None:
|
||||
self._task.args = dict(filter(lambda x: x[1] != omit_token, iteritems(self._task.args)))
|
||||
self._task.args = dict((i[0], i[1]) for i in iteritems(self._task.args) if i[1] != omit_token)
|
||||
|
||||
# Read some values from the task, so that we can modify them if need be
|
||||
retries = self._task.retries
|
||||
|
|
Loading…
Reference in a new issue