def __exit__(self, exc_type, exc_val, exc_tb):
        """Run tool._setup() for each tool in our toolmap."""
        map = cherrypy.serving.request.toolmaps.get(self.namespace)
        if map:
            for name, settings in map.items():
                if settings.get('on', False):
                    tool = getattr(self, name)
                    tool._setup()
Run tool._setup() for each tool in our toolmap.
cherrypy/_cptools.py