Skip to content

Commit 2677e9c

Browse files
authored
Merge pull request #1848 from Akasurde/i1753
Check availability of poll method before using
2 parents 3165e80 + 13c4c76 commit 2677e9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kubernetes/base/stream/ws_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def update(self, timeout=0):
179179
# efficient as epoll. Will work for fd numbers above 1024.
180180
# select.epoll() - newest and most efficient way of polling.
181181
# However, only works on linux.
182-
if sys.platform.startswith('linux') or sys.platform in ['darwin']:
182+
if hasattr(select, "poll"):
183183
poll = select.poll()
184184
poll.register(self.sock.sock, select.POLLIN)
185185
r = poll.poll(timeout)

0 commit comments

Comments
 (0)