summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/matcher/xpath.py
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/xmlstream/matcher/xpath.py')
-rw-r--r--sleekxmpp/xmlstream/matcher/xpath.py3
1 files changed, 2 insertions, 1 deletions
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: