diff options
author | Toshio Kuratomi <toshio@fedoraproject.org> | 2015-09-02 23:47:11 -0700 |
---|---|---|
committer | Toshio Kuratomi <toshio@fedoraproject.org> | 2015-09-03 00:06:34 -0700 |
commit | 1ae28f606b189b858796ddf9dda4865daad775d6 (patch) | |
tree | 9904935fd9ea5547025194e5415237d27c634002 | |
parent | dac562a13246366d943655b88ff2bf28c72f22f4 (diff) | |
download | ansible-1ae28f606b189b858796ddf9dda4865daad775d6.tar.gz |
Refactor to replace filter and lambda with a generator expression
-rw-r--r-- | lib/ansible/executor/task_executor.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py index ca5712757a..35fe8329ee 100644 --- a/lib/ansible/executor/task_executor.py +++ b/lib/ansible/executor/task_executor.py @@ -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 |