yields stdout data, chunk by chunk

        :param chunk_size: size of each chunk (in bytes)

def iter_content(self, chunk_size=1, warn_only=False):
        """
        yields stdout data, chunk by chunk

        :param chunk_size: size of each chunk (in bytes)
        """
        self._state = "not finished"
        if self.return_code is not None:
            stdout = io.BytesIO(self._stdout)
            data = stdout.read(chunk_size)
            while data:
                yield data
                data = stdout.read(chunk_size)
        else:
            data = b''
            started_at = time.time()
            with self._stream() as proc:
                while proc.poll() is None:
                    chunk = proc.stdout.read(chunk_size)
                    if not chunk:
                        continue
                    yield chunk
                    data += chunk

                if proc.returncode == -9:
                    elapsed = time.time() - started_at
                    self._state = "timeouted"
                    raise subprocess.TimeoutExpired(proc.args, elapsed)

                chunk = proc.stdout.read(chunk_size)
                while chunk:
                    yield chunk
                    data += chunk
                    chunk = proc.stdout.read(chunk_size)

            self._return_code = proc.returncode
            self._stderr = proc.stderr.read()
            self._stdout = data

            self._state = FINISHED
            if not warn_only:
                self.raise_for_error()