Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
1ae28f60
Commit
1ae28f60
authored
9 years ago
by
Toshio Kuratomi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor to replace filter and lambda with a generator expression
parent
dac562a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
+1
-1
lib/ansible/executor/task_executor.py
+1
-1
No files found.
lib/ansible/executor/task_executor.py
View file @
1ae28f60
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment