1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Simplify code

This commit is contained in:
Toshio Kuratomi 2015-12-09 12:07:36 -08:00 committed by Matt Clay
parent 13deae9b8f
commit 6f40bab20f

View file

@ -637,9 +637,10 @@ class LxcContainerManagement(object):
variables.pop(v, None)
return_dict = dict()
false_values = [None, ''] + BOOLEANS_FALSE
for k, v in variables.items():
_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
else:
return return_dict