summaryrefslogtreecommitdiffstats
path: root/pym/portage/util/_eventloop/PollConstants.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-02-17 14:56:21 -0800
committerZac Medico <zmedico@gentoo.org>2012-02-17 14:56:21 -0800
commitc37684d037834a51b036d861ee37890edded366e (patch)
treeddfcda06f2ff6abfdf83f6ba114353cc03ba6399 /pym/portage/util/_eventloop/PollConstants.py
parent6e6ef6f87f8cb2d51a53b2d4417c4b370f7ca495 (diff)
downloadportage-c37684d037834a51b036d861ee37890edded366e.tar.gz
portage-c37684d037834a51b036d861ee37890edded366e.tar.bz2
portage-c37684d037834a51b036d861ee37890edded366e.zip
Move Poll{Constants,SelectAdapter} to _eventloop.
Diffstat (limited to 'pym/portage/util/_eventloop/PollConstants.py')
-rw-r--r--pym/portage/util/_eventloop/PollConstants.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/pym/portage/util/_eventloop/PollConstants.py b/pym/portage/util/_eventloop/PollConstants.py
new file mode 100644
index 000000000..d0270a996
--- /dev/null
+++ b/pym/portage/util/_eventloop/PollConstants.py
@@ -0,0 +1,18 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+import select
+class PollConstants(object):
+
+ """
+ Provides POLL* constants that are equivalent to those from the
+ select module, for use by PollSelectAdapter.
+ """
+
+ names = ("POLLIN", "POLLPRI", "POLLOUT", "POLLERR", "POLLHUP", "POLLNVAL")
+ v = 1
+ for k in names:
+ locals()[k] = getattr(select, k, v)
+ v *= 2
+ del k, v
+