logger = logging.getLogger()
logger.disabled = True
... whatever you want ...
logger.disabled = False