code: def wait_for_capture(self, timeout=None):
          
          if self._process is None:
              raise sniffer.InvalidOperationError(
                                    "Trying to wait on a non-started process")
          try:
              utils.wait_for_standing_subprocess(self._process, timeout)
              self._post_process()
          except subprocess.TimeoutExpired:
              self.stop_capture()
docs: See base class documentation