Don’t check for logging.NullHandler, it got added in Python 3.1.
This commit is contained in:
parent
49beb3ac08
commit
06de587ed2
@ -7,14 +7,7 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
if hasattr(logging, 'NullHandler'):
|
logging.getLogger(__name__).addHandler(logging.NullHandler())
|
||||||
NullHandler = logging.NullHandler
|
|
||||||
else:
|
|
||||||
class NullHandler(logging.Handler):
|
|
||||||
def handle(self, record):
|
|
||||||
pass
|
|
||||||
logging.getLogger(__name__).addHandler(NullHandler())
|
|
||||||
del NullHandler
|
|
||||||
|
|
||||||
|
|
||||||
from slixmpp.stanza import Message, Presence, Iq
|
from slixmpp.stanza import Message, Presence, Iq
|
||||||
|
Loading…
Reference in New Issue
Block a user