def _has_effective_handler(logger):
 while True:
  if logger.handlers:
   return True
  if (not logger.parent):
   return False
  logger = logger.parent

def _has_effective_handler ( logger ) : while True : if logger . handlers : return True if ( not logger . parent ) : return False logger = logger . parent
checks if a logger has a handler that will catch its messages in its logger hierarchy .