From a8ff3586d3852fc70b1932a579cf8a28ce920d5c Mon Sep 17 00:00:00 2001 From: Nathan Fritz Date: Fri, 8 Jan 2010 06:03:02 +0000 Subject: * python 2.6 compatibility --- sleekxmpp/xmlstream/matcher/xmlmask.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sleekxmpp/xmlstream/matcher/xmlmask.py') diff --git a/sleekxmpp/xmlstream/matcher/xmlmask.py b/sleekxmpp/xmlstream/matcher/xmlmask.py index a1610489..e8e4df02 100644 --- a/sleekxmpp/xmlstream/matcher/xmlmask.py +++ b/sleekxmpp/xmlstream/matcher/xmlmask.py @@ -25,7 +25,7 @@ class MatchXMLMask(base.MatcherBase): #TODO require namespaces if source == None: #if element not found (happens during recursive check below) return False - if type(maskobj) == type(str()): #if the mask is a string, make it an xml obj + if not hasattr(maskobj, 'attrib'): #if the mask is a string, make it an xml obj try: maskobj = cElementTree.fromstring(maskobj) except ExpatError: -- cgit v1.2.3