[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [arm/master] Dropping isValidIpAddress()
commit 4cb6013833c95da11d61a080e87035951b9060b3
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Sat Sep 21 17:48:26 2013 -0700
Dropping isValidIpAddress()
Unused function. We alredy swapped over to stem's more tested version earlier.
---
arm/util/connections.py | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/arm/util/connections.py b/arm/util/connections.py
index 38fdf70..65ba52b 100644
--- a/arm/util/connections.py
+++ b/arm/util/connections.py
@@ -107,21 +107,6 @@ CONFIG = conf.config_dict("arm", {
PORT_USAGE = {}
-def isValidIpAddress(ipStr):
- """
- Returns true if input is a valid IPv4 address, false otherwise.
- """
-
- # checks if theres four period separated values
- if not ipStr.count(".") == 3: return False
-
- # checks that each value in the octet are decimal values between 0-255
- for ipComp in ipStr.split("."):
- if not ipComp.isdigit() or int(ipComp) < 0 or int(ipComp) > 255:
- return False
-
- return True
-
def isIpAddressPrivate(ipAddr):
"""
Provides true if the IP address belongs on the local network or belongs to
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits