Skip to content
This repository was archived by the owner on Mar 2, 2025. It is now read-only.

Commit 37503a8

Browse files
committed
Disable some SonarCloud.io S1313 IPv4 / IPv6 checks
1 parent 5cfb50a commit 37503a8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ciscoconfparse/ccp_util.py

+4
Original file line numberDiff line numberDiff line change
@@ -1843,7 +1843,9 @@ def _ipv6_params_dict_DEPRECATED(self, arg, debug=0):
18431843
elif isinstance(arg, int):
18441844
# Assume this arg int() represents an IPv6 host-address
18451845
addr = str(IPv6Address(arg))
1846+
#pragma warning disable S1313
18461847
netmask = 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff'
1848+
#pragma warning restore S1313
18471849
masklen = 128
18481850

18491851
elif isinstance(arg, IPv6Obj):
@@ -2892,9 +2894,11 @@ def check_valid_ipaddress(input_addr=None):
28922894
return (input_addr, ipaddr_family)
28932895

28942896

2897+
#pragma warning disable S1313
28952898
@logger.catch(reraise=True)
28962899
@deprecated(reason="reverse_dns_lookup() is obsolete; use dns_query() instead. reverse_dns_lookup() will be removed", version='1.7.0')
28972900
def reverse_dns_lookup(input_str, timeout=3.0, server="4.2.2.2", proto="udp"):
2901+
#pragma warning restore S1313
28982902
"""Perform a simple reverse DNS lookup on an IPv4 or IPv6 address; return results in a python dictionary"""
28992903
if not isinstance(proto, str) and (proto=="udp" or proto=="tcp"):
29002904
raise ValueError

0 commit comments

Comments
 (0)