community.general/lib/ansible/module_utils/network/f5/compare.py
Tim Rupp e619052424
Fixes multiple lgtm issues (#45629)
Most of the issues were just inclusions of code that were not used.
This cleans those up. Other alerts were semi-false-positives for now
2018-09-13 15:26:17 -04:00

21 lines
541 B
Python

# -*- coding: utf-8 -*-
#
# Copyright (c) 2017 F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
def cmp_simple_list(want, have):
if want is None:
return None
if have is None and want == '':
return None
if have is not None and want == '':
return []
if have is None:
return want
if set(want) != set(have):
return want
return None