Use socket.inet_aton for isIPV4 since Windows doesn't (always?) have inet_pton

Closes: Sf#3430008
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
This commit is contained in:
James McCoy 2011-12-05 22:48:09 -05:00
parent 4833976294
commit 360a2036ac

View File

@ -73,7 +73,7 @@ def isIPV4(s):
0 0
""" """
try: try:
return bool(socket.inet_pton(socket.AF_INET, s)) return bool(socket.inet_aton(s))
except socket.error: except socket.error:
return False return False