fixed matcher bug introduced with stanza matching
This commit is contained in:
parent
e39a2395d7
commit
7a9a86af3d
@ -16,7 +16,8 @@ class MatchXMLMask(base.MatcherBase):
|
|||||||
self.default_ns = ns
|
self.default_ns = ns
|
||||||
|
|
||||||
def match(self, xml):
|
def match(self, xml):
|
||||||
xml = xml.xml
|
if hasattr(xml, 'xml'):
|
||||||
|
xml = xml.xml
|
||||||
return self.maskcmp(xml, self._criteria, True)
|
return self.maskcmp(xml, self._criteria, True)
|
||||||
|
|
||||||
def maskcmp(self, source, maskobj, use_ns=False, default_ns='__no_ns__'):
|
def maskcmp(self, source, maskobj, use_ns=False, default_ns='__no_ns__'):
|
||||||
|
@ -6,7 +6,8 @@ ignore_ns = False
|
|||||||
class MatchXPath(base.MatcherBase):
|
class MatchXPath(base.MatcherBase):
|
||||||
|
|
||||||
def match(self, xml):
|
def match(self, xml):
|
||||||
xml = xml.xml
|
if hasattr(xml, 'xml'):
|
||||||
|
xml = xml.xml
|
||||||
x = cElementTree.Element('x')
|
x = cElementTree.Element('x')
|
||||||
x.append(xml)
|
x.append(xml)
|
||||||
if not ignore_ns:
|
if not ignore_ns:
|
||||||
|
Loading…
Reference in New Issue
Block a user