diff --git a/kombu/utils/eventio.py b/kombu/utils/eventio.py index 7f9aecaa..ae6b1887 100644 --- a/kombu/utils/eventio.py +++ b/kombu/utils/eventio.py @@ -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())