Commit 2f4a79e0 authored by Philipp Hörist's avatar Philipp Hörist

DiscoInfo: Add serialize() method

parent 18c9fd5a
......@@ -150,6 +150,11 @@ class DiscoInfo(namedtuple('DiscoInfo', 'stanza identities features dataforms ti
def supports(self, feature):
return feature in self.features
def serialize(self):
if self.stanza is None:
raise ValueError('Unable to serialize DiscoInfo, no stanza found')
return str(self.stanza)
def node(self):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment