mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 14:20:22 -07:00
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
This commit is contained in:
parent
e68f895e61
commit
e619052424
40 changed files with 255 additions and 239 deletions
21
lib/ansible/module_utils/network/f5/compare.py
Normal file
21
lib/ansible/module_utils/network/f5/compare.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
# -*- 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
|
Loading…
Add table
Add a link
Reference in a new issue