def validate_search(self):
        "Check that the current search action is valid."
        if self.__stop_search:
            self.__stop_search = False
            raise StopIteration('Search has been canceled!')
Check that the current search action is valid.
recipes/Python/578154_Directory_Pruner_4/recipe-578154.py