Simplify code
This commit is contained in:
parent
13deae9b8f
commit
6f40bab20f
1 changed files with 2 additions and 1 deletions
|
@ -637,9 +637,10 @@ class LxcContainerManagement(object):
|
||||||
variables.pop(v, None)
|
variables.pop(v, None)
|
||||||
|
|
||||||
return_dict = dict()
|
return_dict = dict()
|
||||||
|
false_values = [None, ''] + BOOLEANS_FALSE
|
||||||
for k, v in variables.items():
|
for k, v in variables.items():
|
||||||
_var = self.module.params.get(k)
|
_var = self.module.params.get(k)
|
||||||
if not [i for i in [None, ''] + BOOLEANS_FALSE if i == _var]:
|
if _var not in false_values:
|
||||||
return_dict[v] = _var
|
return_dict[v] = _var
|
||||||
else:
|
else:
|
||||||
return return_dict
|
return return_dict
|
||||||
|
|
Loading…
Reference in a new issue