fixed matcher bug introduced with stanza matching

This commit is contained in:
Nathan Fritz 2010-01-15 21:36:53 -08:00
parent e39a2395d7
commit 7a9a86af3d
2 changed files with 4 additions and 2 deletions

View file

@ -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__'):

View file

@ -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: