From 9a3598b599adacd57b88a8e1bc480c73ec437a93 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Tue, 1 Sep 2020 08:22:05 +0200 Subject: [PATCH] fix pooler so finisher is optional --- respodns/util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/respodns/util.py b/respodns/util.py index af18cae..b1b4787 100644 --- a/respodns/util.py +++ b/respodns/util.py @@ -64,7 +64,8 @@ def make_pooler(pool_size, finisher=None): desired_size = 0 if finish else pool_size - 1 while len(pending) > desired_size: done, pending = await wait(pending, return_when=FIRST_COMPLETED) - finisher(done, pending) + if finisher is not None: + finisher(done, pending) return pooler