This commit is contained in:
Miroslav Stampar
2016-10-22 22:07:29 +02:00
parent 0398cbdc76
commit d2bbe80455
5 changed files with 14 additions and 8 deletions

View File

@@ -2410,7 +2410,10 @@ def findLocalPort(ports):
for port in ports:
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
s = socket._orig_socket(socket.AF_INET, socket.SOCK_STREAM)
except AttributeError:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((LOCALHOST, port))
retVal = port
break