1 |
commit: 7a55f93d76bab41f025b77fc4e356d6a5b4b9385 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 22 16:23:18 2012 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 22 16:23:18 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=7a55f93d |
7 |
|
8 |
EventLoop: handle EINTR IOError for epoll |
9 |
|
10 |
--- |
11 |
pym/portage/util/_eventloop/EventLoop.py | 6 ++++-- |
12 |
1 files changed, 4 insertions(+), 2 deletions(-) |
13 |
|
14 |
diff --git a/pym/portage/util/_eventloop/EventLoop.py b/pym/portage/util/_eventloop/EventLoop.py |
15 |
index eed68fe..44a3c26 100644 |
16 |
--- a/pym/portage/util/_eventloop/EventLoop.py |
17 |
+++ b/pym/portage/util/_eventloop/EventLoop.py |
18 |
@@ -96,9 +96,11 @@ class EventLoop(object): |
19 |
try: |
20 |
self._poll_event_queue.extend(self._poll_obj.poll(timeout)) |
21 |
break |
22 |
- except select.error as e: |
23 |
+ except (IOError, select.error) as e: |
24 |
# Silently handle EINTR, which is normal when we have |
25 |
- # received a signal such as SIGINT. |
26 |
+ # received a signal such as SIGINT (epoll objects may |
27 |
+ # raise IOError rather than select.error, at least in |
28 |
+ # Python 3.2). |
29 |
if not (e.args and e.args[0] == errno.EINTR): |
30 |
writemsg_level("\n!!! select error: %s\n" % (e,), |
31 |
level=logging.ERROR, noiselevel=-1) |