diff options
author | Lance Stout <lancestout@gmail.com> | 2011-12-28 09:53:22 -0500 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2011-12-28 09:53:22 -0500 |
commit | 1a61bdb302e48d29888ab9b9cc23421bbb3fbead (patch) | |
tree | 5667fb7c607e04ba77f8991e2da52f9e57572746 /sleekxmpp | |
parent | e8545dd2bc94e609079210c321a97f9e3cd75c52 (diff) | |
download | slixmpp-1a61bdb302e48d29888ab9b9cc23421bbb3fbead.tar.gz slixmpp-1a61bdb302e48d29888ab9b9cc23421bbb3fbead.tar.bz2 slixmpp-1a61bdb302e48d29888ab9b9cc23421bbb3fbead.tar.xz slixmpp-1a61bdb302e48d29888ab9b9cc23421bbb3fbead.zip |
Ensure that stanza plugins work as expected if the XML is appended.
Diffstat (limited to 'sleekxmpp')
-rw-r--r-- | sleekxmpp/xmlstream/stanzabase.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py index 2f864300..8678ca14 100644 --- a/sleekxmpp/xmlstream/stanzabase.py +++ b/sleekxmpp/xmlstream/stanzabase.py @@ -345,7 +345,8 @@ class ElementBase(object): """ if attrib not in self.plugins: plugin_class = self.plugin_attrib_map[attrib] - plugin = plugin_class(parent=self) + existing_xml = self.xml.find(plugin_class.tag_name()) + plugin = plugin_class(parent=self, xml=existing_xml) self.plugins[attrib] = plugin if plugin_class in self.plugin_iterables: self.iterables.append(plugin) |