summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2021-05-01 14:19:16 -0700
committerBob Halley <halley@dnspython.org>2021-05-01 14:19:16 -0700
commit3deb941a5434a35a8ba81b6cee006677d9d566dc (patch)
tree97f7bfec78a997d16594136e1c682b9d73c8bf4b
parent1f8b41a9e2144c714d865b2f9c4a78eccaa122dd (diff)
downloaddnspython-3deb941a5434a35a8ba81b6cee006677d9d566dc.tar.gz
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.
-rw-r--r--tests/nanonameserver.py2
1 files changed, 1 insertions, 1 deletions
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):