Author Alexey.Poryadin
Recipients Alexey.Poryadin
Date 2014-12-08.10:36:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
When is called `select`, but registered no one `fileobject` rise exception:
    polled =
  File "/usr/lib/python3.4/", 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:45Alexey.Poryadinsetrecipients: + Alexey.Poryadin
2014-12-08 10:36:45Alexey.Poryadinsetmessageid: <>
2014-12-08 10:36:45Alexey.Poryadinlinkissue23009 messages
2014-12-08 10:36:44Alexey.Poryadincreate