From 9d14c2d71ce85fe95aa9a2321738abb25d032b0c Mon Sep 17 00:00:00 2001 From: Vratko Polak Date: Wed, 16 Jun 2021 12:58:22 +0200 Subject: Traffic scripts: Fix docstrings The IP address checking functions do not raise the exceptions listed, they except them and return False. Change-Id: I74e52b65bac99c8ca8679d4cc6395067ccc6a961 Signed-off-by: Vratko Polak --- GPL/traffic_scripts/lisp/lisp_check.py | 2 -- GPL/traffic_scripts/lisp/lispgpe_check.py | 2 -- GPL/traffic_scripts/nat.py | 2 -- GPL/traffic_scripts/send_icmp_wait_for_reply.py | 2 -- GPL/traffic_scripts/send_ip_check_headers.py | 2 -- 5 files changed, 10 deletions(-) (limited to 'GPL') diff --git a/GPL/traffic_scripts/lisp/lisp_check.py b/GPL/traffic_scripts/lisp/lisp_check.py index c388348b3b..bfe8990e1c 100644 --- a/GPL/traffic_scripts/lisp/lisp_check.py +++ b/GPL/traffic_scripts/lisp/lisp_check.py @@ -73,7 +73,6 @@ def valid_ipv4(ip_address): :type ip_address: str :returns: True if IP address is correct. :rtype: bool - :raises AttributeError, AddressValueError: If IP address is not valid. """ try: ipaddress.IPv4Address(ip_address) @@ -89,7 +88,6 @@ def valid_ipv6(ip_address): :type ip_address: str :returns: True if IP address is correct. :rtype: bool - :raises AttributeError, AddressValueError: If IP address is not valid. """ try: ipaddress.IPv6Address(ip_address) diff --git a/GPL/traffic_scripts/lisp/lispgpe_check.py b/GPL/traffic_scripts/lisp/lispgpe_check.py index f8fa595867..85c85885f6 100644 --- a/GPL/traffic_scripts/lisp/lispgpe_check.py +++ b/GPL/traffic_scripts/lisp/lispgpe_check.py @@ -99,7 +99,6 @@ def valid_ipv4(ip_address): :type ip_address: str :returns: True if IP address is correct. :rtype: bool - :raises AttributeError, AddressValueError: If IP address is not valid. """ try: ipaddress.IPv4Address(ip_address) @@ -115,7 +114,6 @@ def valid_ipv6(ip_address): :type ip_address: str :returns: True if IP address is correct. :rtype: bool - :raises AttributeError, AddressValueError: If IP address is not valid. """ try: ipaddress.IPv6Address(ip_address) diff --git a/GPL/traffic_scripts/nat.py b/GPL/traffic_scripts/nat.py index 994157ae81..9e224dbae8 100644 --- a/GPL/traffic_scripts/nat.py +++ b/GPL/traffic_scripts/nat.py @@ -45,7 +45,6 @@ def valid_ipv4(ip_address): :type ip_address: str :returns: True if IP address is correct. :rtype: bool - :raises AttributeError, AddressValueError: If IP address is not valid. """ try: ipaddress.IPv4Address(ip_address) @@ -61,7 +60,6 @@ def valid_ipv6(ip_address): :type ip_address: str :returns: True if IP address is correct. :rtype: bool - :raises AttributeError, AddressValueError: If IP address is not valid. """ try: ipaddress.IPv6Address(ip_address) diff --git a/GPL/traffic_scripts/send_icmp_wait_for_reply.py b/GPL/traffic_scripts/send_icmp_wait_for_reply.py index 295de2fc0b..ea82a81f4b 100644 --- a/GPL/traffic_scripts/send_icmp_wait_for_reply.py +++ b/GPL/traffic_scripts/send_icmp_wait_for_reply.py @@ -45,7 +45,6 @@ def valid_ipv4(ip_address): :type ip_address: str :returns: True if IP address is correct. :rtype: bool - :raises AttributeError, AddressValueError: If IP address is not valid. """ try: ipaddress.IPv4Address(ip_address) @@ -61,7 +60,6 @@ def valid_ipv6(ip_address): :type ip_address: str :returns: True if IP address is correct. :rtype: bool - :raises AttributeError, AddressValueError: If IP address is not valid. """ try: ipaddress.IPv6Address(ip_address) diff --git a/GPL/traffic_scripts/send_ip_check_headers.py b/GPL/traffic_scripts/send_ip_check_headers.py index 0ecebbe398..be1f7f045a 100644 --- a/GPL/traffic_scripts/send_ip_check_headers.py +++ b/GPL/traffic_scripts/send_ip_check_headers.py @@ -49,7 +49,6 @@ def valid_ipv4(ip_address): :type ip_address: str :returns: True if IP address is correct. :rtype: bool - :raises AttributeError, AddressValueError: If IP address is not valid. """ try: ipaddress.IPv4Address(ip_address) @@ -65,7 +64,6 @@ def valid_ipv6(ip_address): :type ip_address: str :returns: True if IP address is correct. :rtype: bool - :raises AttributeError, AddressValueError: If IP address is not valid. """ try: ipaddress.IPv6Address(ip_address) -- cgit 1.2.3-korg