summaryrefslogtreecommitdiffstats
path: root/pym/portage/util/_eventloop/EventLoop.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-02-09 16:41:14 -0800
committerZac Medico <zmedico@gentoo.org>2012-02-09 16:41:14 -0800
commit963fa653fc0d7aff25bb4756df8398b88193547c (patch)
treea789d22c254b210a36e6407d921bb9f81470608f /pym/portage/util/_eventloop/EventLoop.py
parent067138de6e4c5ca5890969b2f0681b0b178a24ed (diff)
downloadportage-963fa653fc0d7aff25bb4756df8398b88193547c.tar.gz
portage-963fa653fc0d7aff25bb4756df8398b88193547c.tar.bz2
portage-963fa653fc0d7aff25bb4756df8398b88193547c.zip
EventLoop: name poll constants like glib's
It's conceivable the constants could be implementation dependent, so use glib's generic IO_* names rather than the POLL* names which are associated specifically with python's select.poll object.
Diffstat (limited to 'pym/portage/util/_eventloop/EventLoop.py')
-rw-r--r--pym/portage/util/_eventloop/EventLoop.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/pym/portage/util/_eventloop/EventLoop.py b/pym/portage/util/_eventloop/EventLoop.py
index 21969e695..02c3cec01 100644
--- a/pym/portage/util/_eventloop/EventLoop.py
+++ b/pym/portage/util/_eventloop/EventLoop.py
@@ -11,7 +11,7 @@ from _emerge.SlotObject import SlotObject
from _emerge.PollConstants import PollConstants
from _emerge.PollSelectAdapter import PollSelectAdapter
-class EventLoop(PollConstants):
+class EventLoop(object):
supports_multiprocessing = True
@@ -37,6 +37,13 @@ class EventLoop(PollConstants):
self._poll_obj = create_poll_instance()
self._polling = False
+ self.IO_ERR = PollConstants.POLLERR
+ self.IO_HUP = PollConstants.POLLHUP
+ self.IO_IN = PollConstants.POLLIN
+ self.IO_NVAL = PollConstants.POLLNVAL
+ self.IO_OUT = PollConstants.POLLOUT
+ self.IO_PRI = PollConstants.POLLPRI
+
def _poll(self, timeout=None):
if self._polling:
return