Remove work around for NullHandler

logging module added NullHandler in Python 2.7, we have
dropped Python 2.6 support now, so don't need the work around
any more.

Change-Id: Ib6fdbc2f92cd66f4846243221e696f1b1fa712df
This commit is contained in:
ChangBo Guo(gcb) 2016-01-13 10:49:05 +08:00
parent 09b9c9674c
commit 72e3e1177d

View File

@ -20,17 +20,5 @@ import logging
# the app we're used from does not set up logging.
LOG = logging.getLogger('stevedore')
if hasattr(logging, 'NullHandler'):
LOG.addHandler(logging.NullHandler())
else:
class NullHandler(logging.Handler):
def handle(self, record):
pass
LOG.addHandler(logging.NullHandler())
def emit(self, record):
pass
def createLock(self):
self.lock = None
LOG.addHandler(NullHandler())