def _MaybeFindPrompt(self):
    if self._find_prompt:
      try:
        self._prompt = self._find_prompt_prefix + re.escape(
            self.child.match.group(1))
        self.re_prompt = re.compile(self._prompt)
        logging.debug('%s: prompt set to %r', self._host, self._prompt)
      except __HOLE__:
        logging.debug('%s: find_prompt set but no capture group - skipping',
                      self._host)
dataset/ETHPy150Open google/capirca/tools/ldpush/pexpect_connection.py/Connection._MaybeFindPrompt