'Parse the yum repolist output.'

def Parse(self, cmd, args, stdout, stderr, return_val, time_taken, knowledge_base):

    _ = (stderr, time_taken, args, knowledge_base)
    self.CheckReturn(cmd, return_val)
    output = iter(stdout.splitlines())
    repo_regexes = {'name': self._re_compile('Repo-name'), 'revision': self._re_compile('Repo-revision'), 'last_update': self._re_compile('Repo-updated'), 'num_packages': self._re_compile('Repo-pkgs'), 'size': self._re_compile('Repo-size'), 'baseurl': self._re_compile('Repo-baseurl'), 'timeout': self._re_compile('Repo-expire')}
    repo_id_re = self._re_compile('Repo-id')
    for line in output:
        match = repo_id_re.match(line)
        if match:
            repo_info = rdf_client.PackageRepository()
            setattr(repo_info, 'id', match.group(1).strip())
            while line:
                for (attr, regex) in repo_regexes.iteritems():
                    match = regex.match(line)
                    if match:
                        setattr(repo_info, attr, match.group(1).strip())
                        break
                line = output.next()
            (yield repo_info)
