Half-open connection limit warning fix

- it only should complain if on Windows and can't determine the Windows
  version
This commit is contained in:
Peter Šurda 2016-11-13 08:50:09 +01:00
parent 2fc2c78299
commit d35062b49c
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -140,10 +140,9 @@ def loadConfig():
def isOurOperatingSystemLimitedToHavingVeryFewHalfOpenConnections(): def isOurOperatingSystemLimitedToHavingVeryFewHalfOpenConnections():
try: try:
VER_THIS=StrictVersion(platform.version())
if sys.platform[0:3]=="win": if sys.platform[0:3]=="win":
VER_THIS=StrictVersion(platform.version())
return StrictVersion("5.1.2600")<=VER_THIS and StrictVersion("6.0.6000")>=VER_THIS return StrictVersion("5.1.2600")<=VER_THIS and StrictVersion("6.0.6000")>=VER_THIS
return False return False
except Exception as err: except Exception as err:
print "Info: we could not tell whether your OS is limited to having very few half open connections because we couldn't interpret the platform version. Don't worry; we'll assume that it is not limited. This tends to occur on Raspberry Pis. :", err
return False return False