From 06de587ed2f7e6439fb2f67a2c64a96a757778ad Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sun, 21 Sep 2014 19:28:10 +0200 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20check=20for=20logging.NullHandl?= =?UTF-8?q?er,=20it=20got=20added=20in=20Python=203.1.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- slixmpp/__init__.py | 9 +-------- 1 file changed, 1 insertion(+), 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