diff --git a/eventlet/hubs/hub.py b/eventlet/hubs/hub.py index e6f6478..09c0f9c 100644 --- a/eventlet/hubs/hub.py +++ b/eventlet/hubs/hub.py @@ -321,3 +321,12 @@ class BaseHub(object): except KeyError: pass + def get_readers(self): + return self.readers + + def get_writers(self): + return self.writers + + def get_excs(self): + return self.excs + diff --git a/greentest/api_test.py b/greentest/api_test.py index 48b227a..c676859 100644 --- a/greentest/api_test.py +++ b/greentest/api_test.py @@ -39,8 +39,8 @@ def check_hub(): api.sleep(0) api.sleep(0) hub = api.get_hub() - for nm in 'readers', 'writers', 'excs': - dct = getattr(hub, nm) + for nm in 'get_readers', 'get_writers', 'get_excs': + dct = getattr(hub, nm)() assert not dct, "hub.%s not empty: %s" % (nm, dct) # Stop the runloop api.get_hub().abort() @@ -85,7 +85,7 @@ class TestApi(tests.TestCase): check_hub() - def test_connect_ssl(self): + def test_connect_ssl(self): def accept_once(listenfd): try: conn, addr = listenfd.accept()