summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2014-09-21 19:28:10 +0200
committerFlorent Le Coz <louiz@louiz.org>2014-09-28 23:58:46 +0200
commit06de587ed2f7e6439fb2f67a2c64a96a757778ad (patch)
treee0db34cb0eaf3d411627eb5d3f5df27942673b92
parent49beb3ac08e1e5c954c0d21ed1a63060cbab236b (diff)
downloadslixmpp-06de587ed2f7e6439fb2f67a2c64a96a757778ad.tar.gz
slixmpp-06de587ed2f7e6439fb2f67a2c64a96a757778ad.tar.bz2
slixmpp-06de587ed2f7e6439fb2f67a2c64a96a757778ad.tar.xz
slixmpp-06de587ed2f7e6439fb2f67a2c64a96a757778ad.zip
Don’t check for logging.NullHandler, it got added in Python 3.1.
-rw-r--r--slixmpp/__init__.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/slixmpp/__init__.py b/slixmpp/__init__.py
index 0a157211..f53f13f1 100644
--- a/slixmpp/__init__.py
+++ b/slixmpp/__init__.py
@@ -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