mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Merge pull request #43184 from terminalmage/issue43162
docker.compare_container: Perform boolean comparison when one side's value is null/None
This commit is contained in:
commit
b6c5314fe9
@ -899,7 +899,7 @@ def compare_container(first, second, ignore=None):
|
||||
continue
|
||||
val1 = result1[conf_dict][item]
|
||||
val2 = result2[conf_dict].get(item)
|
||||
if item in ('OomKillDisable',):
|
||||
if item in ('OomKillDisable',) or (val1 is None or val2 is None):
|
||||
if bool(val1) != bool(val2):
|
||||
ret.setdefault(conf_dict, {})[item] = {'old': val1, 'new': val2}
|
||||
elif item == 'Image':
|
||||
@ -922,7 +922,7 @@ def compare_container(first, second, ignore=None):
|
||||
continue
|
||||
val1 = result1[conf_dict].get(item)
|
||||
val2 = result2[conf_dict][item]
|
||||
if item in ('OomKillDisable',):
|
||||
if item in ('OomKillDisable',) or (val1 is None or val2 is None):
|
||||
if bool(val1) != bool(val2):
|
||||
ret.setdefault(conf_dict, {})[item] = {'old': val1, 'new': val2}
|
||||
elif item == 'Image':
|
||||
|
Loading…
Reference in New Issue
Block a user