From 3deb941a5434a35a8ba81b6cee006677d9d566dc Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Sat, 1 May 2021 14:19:16 -0700 Subject: If a message handler returned None, do not yield it to the caller. This is a bit cleaner than yielding it and having the caller throw an exception trying to treat it as a message. --- tests/nanonameserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/nanonameserver.py b/tests/nanonameserver.py index 18ba6c5..5c9a9c7 100644 --- a/tests/nanonameserver.py +++ b/tests/nanonameserver.py @@ -237,7 +237,7 @@ class Server(threading.Thread): out = thing.to_wire(self.origin, multi=multi, tsig_ctx=tsig_ctx) tsig_ctx = thing.tsig_ctx yield out - else: + elif thing is not None: yield thing async def serve_udp(self): -- cgit v1.2.1