def _start_next_case(self, server):
        """ Look for the next case and start it. """

        if self._todo:
            self._logger.debug('    run startup case')
            case = self._todo.pop(0)
            in_use = self._run_case(case, server)
        elif self._rerun:
            self._logger.debug('    rerun case')
            case = self._rerun.pop(0)
            in_use = self._run_case(case, server)
        elif self._iter is None:
            self._logger.debug('    no more cases')
            in_use = False
        else:
            try:
                case = self._iter.next()
            except __HOLE__:
                self._logger.debug('    no more cases')
                self._iter = None
                in_use = False
            else:
                self._logger.debug('    run next case')
                in_use = self._run_case(case, server)

        return in_use
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.lib/src/openmdao/lib/drivers/caseiterdriver.py/CaseIteratorDriver._start_next_case