raise Exception

This commit is contained in:
mathieui 2019-08-22 20:11:23 +02:00
parent 27d3ae958b
commit 672f1b28f6
No known key found for this signature in database
GPG key ID: C59F84CEEFD616E3

View file

@ -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)