diff options
author | Bob Halley <halley@dnspython.org> | 2021-05-01 14:19:16 -0700 |
---|---|---|
committer | Bob Halley <halley@dnspython.org> | 2021-05-01 14:19:16 -0700 |
commit | 3deb941a5434a35a8ba81b6cee006677d9d566dc (patch) | |
tree | 97f7bfec78a997d16594136e1c682b9d73c8bf4b | |
parent | 1f8b41a9e2144c714d865b2f9c4a78eccaa122dd (diff) | |
download | dnspython-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.py | 2 |
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): |