Skip to content

Commit e4dff6a

Browse files
committed
Merge pull request #816 from krytarowski/bsds
Fix isOurOperatingSystemLimitedToHavingVeryFewHalfOpenConnections on BSD
2 parents 72ea076 + 6395754 commit e4dff6a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/helper_startup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,11 @@ def loadConfig():
140140

141141
def isOurOperatingSystemLimitedToHavingVeryFewHalfOpenConnections():
142142
try:
143-
VER_THIS=StrictVersion(platform.version())
144143
if sys.platform[0:3]=="win":
144+
# This check won't work on BSD platforms, replacing it with
145+
# platform.release() still won't be portable, as e.g. FreeBSD might
146+
# return '11.0-CURRENT'. Leave the version check for Windows only.
147+
VER_THIS=StrictVersion(platform.version())
145148
return StrictVersion("5.1.2600")<=VER_THIS and StrictVersion("6.0.6000")>=VER_THIS
146149
return False
147150
except Exception as err:

0 commit comments

Comments
 (0)