Fix Windows support (broken in 543e7882).

This commit is contained in:
Valentin Lorentz 2011-10-29 14:46:35 +02:00
parent c0beda2422
commit 08405c6ec5
2 changed files with 5 additions and 2 deletions

View File

@ -114,7 +114,10 @@ def isIPV4(s):
0 0
""" """
try: try:
return bool(socket.inet_pton(socket.AF_INET, s)) try:
return bool(socket.inet_pton(socket.AF_INET, s))
except AttributeError: # Running Windows.
return bool(socket.inet_aton(s))
except socket.error: except socket.error:
return False return False

View File

@ -1,3 +1,3 @@
"""stick the various versioning attributes in here, so we only have to change """stick the various versioning attributes in here, so we only have to change
them once.""" them once."""
version = '0.83.4.1+limnoria (2011-10-29T13:46:10+0200)' version = '0.83.4.1+limnoria (2011-10-29T14:46:35+0200)'