From 360a2036ac26d78c3f98db37239da9987f5c326a Mon Sep 17 00:00:00 2001 From: James McCoy Date: Mon, 5 Dec 2011 22:48:09 -0500 Subject: [PATCH] Use socket.inet_aton for isIPV4 since Windows doesn't (always?) have inet_pton Closes: Sf#3430008 Signed-off-by: James McCoy --- src/utils/net.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/net.py b/src/utils/net.py index ffe8c2005..17abb3b5b 100644 --- a/src/utils/net.py +++ b/src/utils/net.py @@ -73,7 +73,7 @@ def isIPV4(s): 0 """ try: - return bool(socket.inet_pton(socket.AF_INET, s)) + return bool(socket.inet_aton(s)) except socket.error: return False