def _removeHandlersFromLogger(logger, handlerTypes=None):
    "\n    Remove all handlers or handlers of a specified type from a logger.\n\n    @param logger: The logger who's handlers should be processed.\n    @type logger: A logging.Logger object\n    @param handlerTypes: A type of handler or list/tuple of types of handlers\n        that should be removed from the logger. If I{None}, all handlers are\n        removed.\n    @type handlerTypes: L{None}, a logging.Handler subclass or\n        I{list}/I{tuple} of logging.Handler subclasses.\n    "
    for handler in logger.handlers:
        if ((handlerTypes is None) or isinstance(handler, handlerTypes)):
            logger.removeHandler(handler)
Remove all handlers or handlers of a specified type from a logger.

@param logger: The logger who's handlers should be processed.
@type logger: A logging.Logger object
@param handlerTypes: A type of handler or list/tuple of types of handlers
    that should be removed from the logger. If I{None}, all handlers are
    removed.
@type handlerTypes: L{None}, a logging.Handler subclass or
    I{list}/I{tuple} of logging.Handler subclasses.
def _removeHandlersFromLogger(logger, handlerTypes=None):
    "\n    Remove all handlers or handlers of a specified type from a logger.\n\n    @param logger: The logger who's handlers should be processed.\n    @type logger: A logging.Logger object\n    @param handlerTypes: A type of handler or list/tuple of types of handlers\n        that should be removed from the logger. If I{None}, all handlers are\n        removed.\n    @type handlerTypes: L{None}, a logging.Handler subclass or\n        I{list}/I{tuple} of logging.Handler subclasses.\n    "
    for handler in logger.handlers:
        if ((handlerTypes is None) or isinstance(handler, handlerTypes)):
            logger.removeHandler(handler)