summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2019-08-22 20:11:23 +0200
committermathieui <mathieui@mathieui.net>2019-12-27 15:27:29 +0100
commit672f1b28f61f0b9558ede7fa1fc7b6510891580c (patch)
treee7ca1e60c8d066532b43c5440c4c4d59f2635b4d
parent27d3ae958b02b05c74e74aa4f4a837166ba3c394 (diff)
downloadslixmpp-672f1b28f61f0b9558ede7fa1fc7b6510891580c.tar.gz
slixmpp-672f1b28f61f0b9558ede7fa1fc7b6510891580c.tar.bz2
slixmpp-672f1b28f61f0b9558ede7fa1fc7b6510891580c.tar.xz
slixmpp-672f1b28f61f0b9558ede7fa1fc7b6510891580c.zip
raise Exception
-rw-r--r--slixmpp/xmlstream/xmlstream.py4
1 files 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)