Browse Source

Pool: Fall back to using select if poll is not supported. Closes #2430

Ask Solem 10 years ago
parent
commit
db2caf540a
1 changed files with 3 additions and 2 deletions
  1. 3 2
      celery/concurrency/asynpool.py

+ 3 - 2
celery/concurrency/asynpool.py

@@ -111,8 +111,9 @@ def _get_job_writer(job):
 
 
 def _select(readers=None, writers=None, err=None, timeout=0,
-            poll=select.poll, POLLIN=select.POLLIN,
-            POLLOUT=select.POLLOUT, POLLERR=select.POLLERR):
+            poll=getattr(select, 'poll', select.select),
+            POLLIN=select.POLLIN, POLLOUT=select.POLLOUT,
+            POLLERR=select.POLLERR):
     """Simple wrapper to :class:`~select.select`, using :`~select.poll`
     as the implementation.