From 672f1b28f61f0b9558ede7fa1fc7b6510891580c Mon Sep 17 00:00:00 2001 From: mathieui Date: Thu, 22 Aug 2019 20:11:23 +0200 Subject: raise Exception --- slixmpp/xmlstream/xmlstream.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slixmpp/xmlstream/xmlstream.py b/slixmpp/xmlstream/xmlstream.py index 200701ea..04d16c6b 100644 --- a/slixmpp/xmlstream/xmlstream.py +++ b/slixmpp/xmlstream/xmlstream.py @@ -911,7 +911,7 @@ class XMLStream(asyncio.BaseProtocol): else: data = filter(data) if data is None: - return + raise Exception('Empty stanza') if isinstance(data, ElementBase): if use_filters: @@ -921,7 +921,7 @@ class XMLStream(asyncio.BaseProtocol): else: data = filter(data) if data is None: - return + raise Exception('Empty stanza') str_data = tostring(data.xml, xmlns=self.default_ns, stream=self, top_level=True) self.send_raw(str_data) -- cgit v1.2.3