From 7a9a86af3d2406ef921ae2d5f8ba7e42eeff973d Mon Sep 17 00:00:00 2001 From: Nathan Fritz Date: Fri, 15 Jan 2010 21:36:53 -0800 Subject: fixed matcher bug introduced with stanza matching --- sleekxmpp/xmlstream/matcher/xpath.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sleekxmpp/xmlstream/matcher/xpath.py') diff --git a/sleekxmpp/xmlstream/matcher/xpath.py b/sleekxmpp/xmlstream/matcher/xpath.py index 5e0411ef..fe18a655 100644 --- a/sleekxmpp/xmlstream/matcher/xpath.py +++ b/sleekxmpp/xmlstream/matcher/xpath.py @@ -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: -- cgit v1.2.3