Apparently we may loop over all sections without a match and return section_id that's not defined. Return None instead. --- yum/config.py | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/yum/config.py b/yum/config.py index 17aa0ca..df24900 100644 --- a/yum/config.py +++ b/yum/config.py @@ -1224,6 +1224,9 @@ def _readRawRepoFile(repo): for sect in ini._sections.keys(): if varReplace(sect, repo.yumvar) == repo.id: section_id = sect + break + else: + return None return ini, section_id def writeRawRepoFile(repo,only=None): -- 1.7.11.7 _______________________________________________ Yum-devel mailing list Yum-devel@lists.baseurl.org http://lists.baseurl.org/mailman/listinfo/yum-devel