Show More
@@ -278,12 +278,11 b' def checkportisavailable(port):' | |||||
278 | except socket.error as exc: |
|
278 | except socket.error as exc: | |
279 | if WINDOWS and exc.errno == errno.WSAEACCES: |
|
279 | if WINDOWS and exc.errno == errno.WSAEACCES: | |
280 | return False |
|
280 | return False | |
281 | elif PYTHON3: |
|
281 | # TODO: make a proper exception handler after dropping py2. This | |
282 | # TODO: make a proper exception handler after dropping py2. This |
|
282 | # works because socket.error is an alias for OSError on py3, | |
283 | # works because socket.error is an alias for OSError on py3, |
|
283 | # which is also the baseclass of PermissionError. | |
284 | # which is also the baseclass of PermissionError. |
|
284 | elif isinstance(exc, PermissionError): | |
285 | if isinstance(exc, PermissionError): |
|
285 | return False | |
286 | return False |
|
|||
287 | if exc.errno not in ( |
|
286 | if exc.errno not in ( | |
288 | errno.EADDRINUSE, |
|
287 | errno.EADDRINUSE, | |
289 | errno.EADDRNOTAVAIL, |
|
288 | errno.EADDRNOTAVAIL, |
General Comments 0
You need to be logged in to leave comments.
Login now