aboutsummaryrefslogtreecommitdiff
path: root/industriart/compat.py
blob: 06fe4409ff772ec25134e89a61bb4a3d60c19ead (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
"""Compatiblity with older python"""

import sys

# python 2.7 introduced a NullHandler which we want to use, but to support
# older versions, we implement our own if needed.
if sys.version_info[:2] > (2, 6):
    from logging import NullHandler
else:
    from logging import Handler
    class NullHandler(Handler):
        def emit(self, record):
            pass