mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-12-24 11:50:53 +00:00
fixed matcher bug introduced with stanza matching
This commit is contained in:
parent
e39a2395d7
commit
7a9a86af3d
2 changed files with 4 additions and 2 deletions
|
@ -16,7 +16,8 @@ class MatchXMLMask(base.MatcherBase):
|
|||
self.default_ns = ns
|
||||
|
||||
def match(self, xml):
|
||||
xml = xml.xml
|
||||
if hasattr(xml, 'xml'):
|
||||
xml = xml.xml
|
||||
return self.maskcmp(xml, self._criteria, True)
|
||||
|
||||
def maskcmp(self, source, maskobj, use_ns=False, default_ns='__no_ns__'):
|
||||
|
|
|
@ -6,7 +6,8 @@ ignore_ns = False
|
|||
class MatchXPath(base.MatcherBase):
|
||||
|
||||
def match(self, xml):
|
||||
xml = xml.xml
|
||||
if hasattr(xml, 'xml'):
|
||||
xml = xml.xml
|
||||
x = cElementTree.Element('x')
|
||||
x.append(xml)
|
||||
if not ignore_ns:
|
||||
|
|
Loading…
Reference in a new issue