Skip to content

Commit 5b5281a

Browse files
authored
fix: adding compatibility for python 2.6 (osquery#58)
1 parent 8a1d5fc commit 5b5281a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

osquery/management.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@
1919
import threading
2020
import time
2121

22+
# logging support for Python 2.6
23+
try:
24+
from logging import NullHandler
25+
except ImportError:
26+
class NullHandler(logging.Handler):
27+
def emit(self, record):
28+
pass
29+
logging.NullHandler = NullHandler
30+
2231
from thrift.protocol import TBinaryProtocol
2332
from thrift.server import TServer
2433
from thrift.transport import TSocket

0 commit comments

Comments
 (0)