Recognize stanzas that don't use the default namespace.
This commit is contained in:
		| @@ -802,7 +802,8 @@ class XMLStream(object): | |||||||
|             default_ns = self.default_ns |             default_ns = self.default_ns | ||||||
|         stanza_type = StanzaBase |         stanza_type = StanzaBase | ||||||
|         for stanza_class in self.__root_stanza: |         for stanza_class in self.__root_stanza: | ||||||
|             if xml.tag == "{%s}%s" % (default_ns, stanza_class.name): |             if xml.tag == "{%s}%s" % (default_ns, stanza_class.name) or \ | ||||||
|  |                xml.tag == stanza_class.tag_name(): | ||||||
|                 stanza_type = stanza_class |                 stanza_type = stanza_class | ||||||
|                 break |                 break | ||||||
|         stanza = stanza_type(self, xml) |         stanza = stanza_type(self, xml) | ||||||
| @@ -827,7 +828,8 @@ class XMLStream(object): | |||||||
|         # stanza type applies, a generic StanzaBase stanza will be used. |         # stanza type applies, a generic StanzaBase stanza will be used. | ||||||
|         stanza_type = StanzaBase |         stanza_type = StanzaBase | ||||||
|         for stanza_class in self.__root_stanza: |         for stanza_class in self.__root_stanza: | ||||||
|             if xml.tag == "{%s}%s" % (self.default_ns, stanza_class.name): |             if xml.tag == "{%s}%s" % (self.default_ns, stanza_class.name) or \ | ||||||
|  |                xml.tag == stanza_class.tag_name(): | ||||||
|                 stanza_type = stanza_class |                 stanza_type = stanza_class | ||||||
|                 break |                 break | ||||||
|         stanza = stanza_type(self, xml) |         stanza = stanza_type(self, xml) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Lance Stout
					Lance Stout