Message232300
When is called `select`, but registered no one `fileobject` rise exception:
...
polled = self._selector.select(timeout)
File "/usr/lib/python3.4/selectors.py", line 424, in select
fd_event_list = self._epoll.poll(timeout, max_ev)
ValueError: maxevents must be greater than 0, got 0
Of course, it makes no sense to call `select` if there is nothing to watch. But "select.epol.poll" is not raises exception in the same case if `max_ev`=-1. And this simplifies the application code and is useful if need just sleep for a timeout.
So, I suggest a small fix:
- fd_event_list = self._epoll.poll(timeout, max_ev)
+ fd_event_list = self._epoll.poll(timeout, max_ev or -1) |
|
Date |
User |
Action |
Args |
2014-12-08 10:36:45 | Alexey.Poryadin | set | recipients:
+ Alexey.Poryadin |
2014-12-08 10:36:45 | Alexey.Poryadin | set | messageid: <1418035005.39.0.294462650059.issue23009@psf.upfronthosting.co.za> |
2014-12-08 10:36:45 | Alexey.Poryadin | link | issue23009 messages |
2014-12-08 10:36:44 | Alexey.Poryadin | create | |
|