Don’t check for logging.NullHandler, it got added in Python 3.1.
This commit is contained in:
parent
49beb3ac08
commit
06de587ed2
1 changed files with 1 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue