Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file removed .ansible/.lock
Empty file.
2 changes: 2 additions & 0 deletions .sanity-ansible-ignore-2.21.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
plugins/modules/firewall_lib.py validate-modules:missing-gplv3-license
plugins/modules/firewall_lib_facts.py validate-modules:missing-gplv3-license
12 changes: 9 additions & 3 deletions library/firewall_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,11 +583,17 @@
export_config_dict,
recursive_show_diffs,
)
from ansible.module_utils.six import string_types
import re
import os
import copy

# ansible six is deprecated, and it seems a lot to add a dependency on python-six
# just for this
try:
lsr_string_types = (basestring,)
except NameError:
lsr_string_types = (str,)

try:
import ipaddress

Expand Down Expand Up @@ -738,7 +744,7 @@ def get_ipset_entries_type(ipset_entries, module):
# ipset options values must be strings
def normalize_ipset_options(ipset_options):
for option, value in ipset_options.items():
if value is not None and not isinstance(value, string_types):
if value is not None and not isinstance(value, lsr_string_types):
ipset_options[option] = str(value)


Expand Down Expand Up @@ -2766,7 +2772,7 @@ def parse_forward_port(module, item):
else:
_to_port = None
_to_addr = item.get("toaddr")
elif isinstance(item, string_types):
elif isinstance(item, lsr_string_types):
args = item.split(";")
if len(args) == 3:
__port, _to_port, _to_addr = args
Expand Down
Loading