From 58d8813c03bd2810081cff9ed8b2257a07f96505 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Wed, 23 Jan 2019 12:44:08 +0000 Subject: [PATCH] issue #477: Py2.4 lacks all(). --- mitogen/service.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mitogen/service.py b/mitogen/service.py index d1285386..0d1ddb45 100644 --- a/mitogen/service.py +++ b/mitogen/service.py @@ -41,6 +41,15 @@ import mitogen.select from mitogen.core import b from mitogen.core import LOG +try: + all +except NameError: + def all(it): + for elem in it: + if not elem: + return False + return True + DEFAULT_POOL_SIZE = 16 _pool = None