mirror of https://github.com/celery/kombu.git
Check against correct types
This commit is contained in:
parent
7c4d27fc33
commit
74e78e1da4
|
@ -11,6 +11,8 @@ import errno
|
|||
import select as __select__
|
||||
import socket
|
||||
|
||||
from kombu.five import int_types
|
||||
|
||||
_selectf = __select__.select
|
||||
_selecterr = __select__.error
|
||||
epoll = getattr(__select__, 'epoll', None)
|
||||
|
@ -219,15 +221,15 @@ class _select(Poller):
|
|||
|
||||
events = {}
|
||||
for fd in read:
|
||||
if not isinstance(fd, int):
|
||||
if not isinstance(fd, int_types):
|
||||
fd = fd.fileno()
|
||||
events[fd] = events.get(fd, 0) | READ
|
||||
for fd in write:
|
||||
if not isinstance(fd, int):
|
||||
if not isinstance(fd, int_types):
|
||||
fd = fd.fileno()
|
||||
events[fd] = events.get(fd, 0) | WRITE
|
||||
for fd in error:
|
||||
if not isinstance(fd, int):
|
||||
if not isinstance(fd, int_types):
|
||||
fd = fd.fileno()
|
||||
events[fd] = events.get(fd, 0) | ERR
|
||||
return list(events.items())
|
||||
|
|
Loading…
Reference in New Issue