diff options
author | Tom Nichols <tmnichols@gmail.com> | 2010-07-12 12:17:57 -0400 |
---|---|---|
committer | Tom Nichols <tmnichols@gmail.com> | 2010-07-12 12:17:57 -0400 |
commit | 02ca5f0e420ab4e99003b87407198209d1cedc50 (patch) | |
tree | 6ba50346b440850f0c44bb0d96ce4c3e3ebdfc06 /sleekxmpp | |
parent | 1e009513ee40cc12320732ac286fdeb2baf634ef (diff) | |
download | slixmpp-02ca5f0e420ab4e99003b87407198209d1cedc50.tar.gz slixmpp-02ca5f0e420ab4e99003b87407198209d1cedc50.tar.bz2 slixmpp-02ca5f0e420ab4e99003b87407198209d1cedc50.tar.xz slixmpp-02ca5f0e420ab4e99003b87407198209d1cedc50.zip |
fixed logging error (logging module was not imported)
Diffstat (limited to 'sleekxmpp')
-rw-r--r-- | sleekxmpp/xmlstream/matcher/xmlmask.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/matcher/xmlmask.py b/sleekxmpp/xmlstream/matcher/xmlmask.py index eba3e954..87433d91 100644 --- a/sleekxmpp/xmlstream/matcher/xmlmask.py +++ b/sleekxmpp/xmlstream/matcher/xmlmask.py @@ -8,6 +8,7 @@ from . import base from xml.etree import cElementTree from xml.parsers.expat import ExpatError +import logging ignore_ns = False @@ -38,7 +39,7 @@ class MatchXMLMask(base.MatcherBase): try: maskobj = cElementTree.fromstring(maskobj) except ExpatError: - logging.log(logging.WARNING, "Expat error: %s\nIn parsing: %s" % ('', maskobj)) + logging.exception( "Expat error parsing: %s", maskobj) if not use_ns and source.tag.split('}', 1)[-1] != maskobj.tag.split('}', 1)[-1]: # strip off ns and compare return False if use_ns and (source.tag != maskobj.tag and "{%s}%s" % (self.default_ns, maskobj.tag) != source.tag ): |