projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33d82be
)
EventLoop.iteration: handle _poll StopIteration
author
Zac Medico
<zmedico@gentoo.org>
Sat, 11 Feb 2012 23:56:07 +0000
(15:56 -0800)
committer
Zac Medico
<zmedico@gentoo.org>
Sat, 11 Feb 2012 23:56:07 +0000
(15:56 -0800)
pym/portage/util/_eventloop/EventLoop.py
patch
|
blob
|
history
diff --git
a/pym/portage/util/_eventloop/EventLoop.py
b/pym/portage/util/_eventloop/EventLoop.py
index c059197c17cfca3caf3dc1c8822f12e6e4a6b33d..0da388d03dbd2b91ce314296665472cdf009c59f 100644
(file)
--- a/
pym/portage/util/_eventloop/EventLoop.py
+++ b/
pym/portage/util/_eventloop/EventLoop.py
@@
-177,7
+177,13
@@
class EventLoop(object):
timeout = self._timeout_interval
else:
timeout = 0
- self._poll(timeout=timeout)
+ try:
+ self._poll(timeout=timeout)
+ except StopIteration:
+ # This could happen if there are no IO event handlers
+ # after _poll() calls _run_timeouts(), due to them
+ # being removed by timeout or idle callbacks.
+ events_handled += 1
try:
while event_handlers and self._poll_event_queue: