fix logging support under python 2.6

Change-Id: I2badb7a5a8f8f2c49eb29ced5ce2e6c745f20af1
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
This commit is contained in:
Doug Hellmann 2012-11-28 06:22:50 -05:00
parent 13d4b56970
commit e7259f89ad

View File

@ -8,4 +8,9 @@ import logging
# Configure a NullHandler for our log messages in case
# the app we're used from does not set up logging.
logging.getLogger(__name__).addHandler(logging.NullHandler())
LOG = logging.getLogger(__name__)
try:
LOG.addHandler(logging.NullHandler())
except AttributeError:
# No NullHandler, probably python 2.6
pass