PYTHON-2320 Use select instead of poll on Jython (#466)

This commit is contained in:
Shane Harvey 2020-07-15 08:55:42 -07:00 committed by GitHub
parent 05267fb465
commit b6bf4f0157
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,8 +16,11 @@
import errno
import select
import sys
_HAVE_POLL = hasattr(select, "poll")
# PYTHON-2320: Jython does not fully support poll on SSL sockets,
# https://bugs.jython.org/issue2900
_HAVE_POLL = hasattr(select, "poll") and not sys.platform.startswith('java')
_SelectError = getattr(select, "error", OSError)