You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2017/09/01 15:03:51 UTC
[23/50] qpid-proton git commit: PROTON-1347: For Python 2.6,
define NullHandler if the logging module doesn't have it
PROTON-1347: For Python 2.6, define NullHandler if the logging module doesn't have it
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/4657d9fb
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/4657d9fb
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/4657d9fb
Branch: refs/heads/go1
Commit: 4657d9fbd4ac999ce3aa6c790d2a80eb9334709d
Parents: 7a381d2
Author: Justin Ross <jr...@apache.org>
Authored: Thu Aug 17 16:09:40 2017 -0700
Committer: Justin Ross <jr...@apache.org>
Committed: Thu Aug 17 16:09:40 2017 -0700
----------------------------------------------------------------------
proton-c/bindings/python/proton/__init__.py | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/4657d9fb/proton-c/bindings/python/proton/__init__.py
----------------------------------------------------------------------
diff --git a/proton-c/bindings/python/proton/__init__.py b/proton-c/bindings/python/proton/__init__.py
index 43f4067..f73e99d 100644
--- a/proton-c/bindings/python/proton/__init__.py
+++ b/proton-c/bindings/python/proton/__init__.py
@@ -37,8 +37,23 @@ from proton import _compat
import logging, weakref, socket, sys, threading
+try:
+ handler = logging.NullHandler()
+except AttributeError:
+ class NullHandler(logging.Handler):
+ def handle(self, record):
+ pass
+
+ def emit(self, record):
+ pass
+
+ def createLock(self):
+ self.lock = None
+
+ handler = NullHandler()
+
log = logging.getLogger("proton")
-log.addHandler(logging.NullHandler())
+log.addHandler(handler)
try:
import uuid
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org