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:
parent
09b9c9674c
commit
72e3e1177d
@ -20,17 +20,5 @@ import logging
|
|||||||
# the app we're used from does not set up logging.
|
# the app we're used from does not set up logging.
|
||||||
LOG = logging.getLogger('stevedore')
|
LOG = logging.getLogger('stevedore')
|
||||||
|
|
||||||
if hasattr(logging, 'NullHandler'):
|
LOG.addHandler(logging.NullHandler())
|
||||||
LOG.addHandler(logging.NullHandler())
|
|
||||||
else:
|
|
||||||
class NullHandler(logging.Handler):
|
|
||||||
def handle(self, record):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def emit(self, record):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def createLock(self):
|
|
||||||
self.lock = None
|
|
||||||
|
|
||||||
LOG.addHandler(NullHandler())
|
|
||||||
|
Loading…
Reference in New Issue
Block a user