From af2317d66a1b94f7d5a6eee24404e5908a131c59 Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Fri, 23 Jul 2010 17:17:18 -0700 Subject: [PATCH] Older version compatibility. --- tests/stdlib/test_asyncore.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/stdlib/test_asyncore.py b/tests/stdlib/test_asyncore.py index 8ea2403..13efe72 100644 --- a/tests/stdlib/test_asyncore.py +++ b/tests/stdlib/test_asyncore.py @@ -41,9 +41,12 @@ def new_closeall_check(self, usedefault): HelperFunctionTests.closeall_check = new_closeall_check -# Eventlet's select() emulation doesn't support the POLLPRI flag, -# which this test relies on. Therefore, nuke it! -BaseTestAPI.test_handle_expt = lambda *a, **kw: None +try: + # Eventlet's select() emulation doesn't support the POLLPRI flag, + # which this test relies on. Therefore, nuke it! + BaseTestAPI.test_handle_expt = lambda *a, **kw: None +except NameError: + pass if __name__ == "__main__": test_main()