From 2ca52d1ebd934035bfdc99a9c777b666ee5cb5e4 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Wed, 9 Nov 2016 10:08:10 +0800 Subject: webui: utils.py: Improve the docstring of "ip_in_network()" --- fg21sim/webui/utils.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'fg21sim/webui/utils.py') diff --git a/fg21sim/webui/utils.py b/fg21sim/webui/utils.py index b3b013a..bf62525 100644 --- a/fg21sim/webui/utils.py +++ b/fg21sim/webui/utils.py @@ -92,7 +92,13 @@ def ip_in_network(ip, network): ip : `~ipaddress.IPv4Address`, str An `~ipaddress.IPv4Address` instance or a string of the IPv4 address network : `~ipaddress.IPv4Network`, str - An `~ipaddress.IPv4Network` instance or a string of the IPv4 network + An `~ipaddress.IPv4Network` instance or a string of the IPv4 network, + which is generally written in the CIDR format. + + Raises + ------ + ValueError : + Input IP or network is invalid. """ if not isinstance(ip, ipaddress.IPv4Address): ip = ipaddress.IPv4Address(ip) -- cgit v1.2.2