Don’t check for logging.NullHandler, it got added in Python 3.1.

This commit is contained in:
Emmanuel Gil Peyrot 2014-09-21 19:28:10 +02:00 committed by Florent Le Coz
parent 49beb3ac08
commit 06de587ed2

View file

@ -7,14 +7,7 @@
"""
import logging
if hasattr(logging, 'NullHandler'):
NullHandler = logging.NullHandler
else:
class NullHandler(logging.Handler):
def handle(self, record):
pass
logging.getLogger(__name__).addHandler(NullHandler())
del NullHandler
logging.getLogger(__name__).addHandler(logging.NullHandler())
from slixmpp.stanza import Message, Presence, Iq