Show More
@@ -278,11 +278,10 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: |
|
|||
282 |
|
|
281 | # TODO: make a proper exception handler after dropping py2. This | |
283 |
|
|
282 | # works because socket.error is an alias for OSError on py3, | |
284 |
|
|
283 | # which is also the baseclass of PermissionError. | |
285 |
|
|
284 | elif isinstance(exc, PermissionError): | |
286 |
|
|
285 | return False | |
287 | if exc.errno not in ( |
|
286 | if exc.errno not in ( | |
288 | errno.EADDRINUSE, |
|
287 | errno.EADDRINUSE, |
General Comments 0
You need to be logged in to leave comments.
Login now