From d4c570b8bc7f605d31963811f46edd035b76acc1 Mon Sep 17 00:00:00 2001 From: Nick Anderson Date: Fri, 13 Jul 2018 10:57:02 -0700 Subject: [PATCH] fix: adding compatibility for python 2.6 --- osquery/management.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/osquery/management.py b/osquery/management.py index 8e813c0..c621558 100644 --- a/osquery/management.py +++ b/osquery/management.py @@ -19,6 +19,15 @@ import threading import time +# logging support for Python 2.6 +try: + from logging import NullHandler +except ImportError: + class NullHandler(logging.Handler): + def emit(self, record): + pass + logging.NullHandler = NullHandler + from thrift.protocol import TBinaryProtocol from thrift.server import TServer from thrift.transport import TSocket