diff options
| author | Benjamin Peterson <benjamin@python.org> | 2011-12-27 16:52:20 -0600 |
|---|---|---|
| committer | Benjamin Peterson <benjamin@python.org> | 2011-12-27 16:52:20 -0600 |
| commit | 70069fcd4b327eb4a6d91a27db7a423e71711b97 (patch) | |
| tree | 60e20257425fe84728cbbd14b0f0aabed75c2ee9 /Lib/test/test_epoll.py | |
| parent | 83251c1ecd244dec4606a194c95f90463c73f6e4 (diff) | |
| download | cpython-git-70069fcd4b327eb4a6d91a27db7a423e71711b97.tar.gz | |
don't fail if CLOEXEC doesn't exist
Diffstat (limited to 'Lib/test/test_epoll.py')
| -rw-r--r-- | Lib/test/test_epoll.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_epoll.py b/Lib/test/test_epoll.py index de8299eec3..7f9547ff95 100644 --- a/Lib/test/test_epoll.py +++ b/Lib/test/test_epoll.py @@ -75,8 +75,9 @@ class TestEPoll(unittest.TestCase): ep.close() self.assertTrue(ep.closed) self.assertRaises(ValueError, ep.fileno) - select.epoll(select.EPOLL_CLOEXEC).close() - self.assertRaises(OSError, select.epoll, flags=12356) + if hasattr(select, "EPOLL_CLOEXEC"): + select.epoll(select.EPOLL_CLOEXEC).close() + self.assertRaises(OSError, select.epoll, flags=12356) def test_badcreate(self): self.assertRaises(TypeError, select.epoll, 1, 2, 3) |
