Commit 1ae28f60 by Toshio Kuratomi

Refactor to replace filter and lambda with a generator expression

parent dac562a1
...@@ -291,7 +291,7 @@ class TaskExecutor: ...@@ -291,7 +291,7 @@ class TaskExecutor:
# And filter out any fields which were set to default(omit), and got the omit token value # And filter out any fields which were set to default(omit), and got the omit token value
omit_token = variables.get('omit') omit_token = variables.get('omit')
if omit_token is not None: 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 # Read some values from the task, so that we can modify them if need be
retries = self._task.retries retries = self._task.retries
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment