mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 19:01:26 -07:00
[PR #8822/7e978c77 backport][stable-9] use dict comprehension in plugins, part 2 (#8832)
use dict comprehension in plugins, part 2 (#8822)
* use dict comprehension in plugins
* add changelog frag
(cherry picked from commit 7e978c77b4
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
19613ce111
commit
7c3b441246
21 changed files with 76 additions and 68 deletions
|
@ -683,11 +683,11 @@ class LxcContainerManagement(object):
|
|||
variables.pop(v, None)
|
||||
|
||||
false_values = BOOLEANS_FALSE.union([None, ''])
|
||||
result = dict(
|
||||
(v, self.module.params[k])
|
||||
result = {
|
||||
v: self.module.params[k]
|
||||
for k, v in variables.items()
|
||||
if self.module.params[k] not in false_values
|
||||
)
|
||||
}
|
||||
return result
|
||||
|
||||
def _config(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue