Example #1
0
    def __init__(self, command, banner, shell=False, timeout=None, sleep=0.1):
        """
        Initialize OutputExecutor executor.

        :param str command: command to run to start service
        :param str banner: string that has to appear in process output -
            should compile to regular expression.
        :param bool shell: see `subprocess.Popen`
        :param int timeout: time to wait for process to start or stop.
            if None, wait indefinitely.
        :param float sleep: how often to check for start/stop condition
        """
        Executor.__init__(self, command, shell, timeout, sleep)
        self._banner = re.compile(banner)