Os port fix (#24913)

* replace deprecated cmp() with custom conditional
cmp is not present in Python3 but several modules use it
Reference 24756
This commit is contained in:
kgottholm
2017-05-23 12:40:56 -04:00
committed by Toshio Kuratomi
parent 841baa3d5b
commit 1e4b227e6f
3 changed files with 3 additions and 4 deletions

View File

@@ -233,8 +233,7 @@ def _needs_update(module, port, cloud):
if module.params[key] is not None and module.params[key] != port[key]:
return True
for key in compare_dict:
if module.params[key] is not None and cmp(module.params[key],
port[key]) != 0:
if module.params[key] is not None and module.params[key] != port[key]:
return True
for key in compare_list:
if module.params[key] is not None and (set(module.params[key]) !=