'Remove plugins that don\'t want to be run anymore and raised a RunOnce
exception during the crawl phase.'

def _remove_discovery_plugin(self, plugin_to_remove):

    for plugin_type in ('crawl', 'infrastructure'):
        if (plugin_to_remove in self._w3af_core.plugins.plugins[plugin_type]):
            msg = 'The    %s    plugin:    "%s"    wont    be    run    anymore.'
            om.out.debug((msg % (plugin_type, plugin_to_remove.get_name())))
            self._disabled_plugins.add(plugin_to_remove)
            self._teardown(plugin_to_remove)
            break
