From 08405c6ec5c6cc7fd3b4a3ef99a90e1bc1eb1c8f Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sat, 29 Oct 2011 14:46:35 +0200 Subject: [PATCH] Fix Windows support (broken in 543e7882). --- src/utils/net.py | 5 ++++- src/version.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/utils/net.py b/src/utils/net.py index a12b12c9f..2ce659912 100644 --- a/src/utils/net.py +++ b/src/utils/net.py @@ -114,7 +114,10 @@ def isIPV4(s): 0 """ 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: return False diff --git a/src/version.py b/src/version.py index e36b83462..553e91278 100644 --- a/src/version.py +++ b/src/version.py @@ -1,3 +1,3 @@ """stick the various versioning attributes in here, so we only have to change 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)'