diff --git a/kubernetes/base/stream/ws_client.py b/kubernetes/base/stream/ws_client.py index 3f4c1225a2..15cc3945fa 100644 --- a/kubernetes/base/stream/ws_client.py +++ b/kubernetes/base/stream/ws_client.py @@ -179,7 +179,7 @@ def update(self, timeout=0): # efficient as epoll. Will work for fd numbers above 1024. # select.epoll() - newest and most efficient way of polling. # However, only works on linux. - if sys.platform.startswith('linux') or sys.platform in ['darwin']: + if hasattr(select, "poll"): poll = select.poll() poll.register(self.sock.sock, select.POLLIN) r = poll.poll(timeout)