Fix KeyError in yumpkg configparser code on Python 3

It looks like the configparser in Python 3 does not insert the
`__name__` key in each section. Popping it without a default causes a
KeyError on Python 3. This commit fixes that KeyError.
This commit is contained in:
Erik Johnson 2017-09-05 15:13:22 -05:00
parent f6c16935d8
commit 433bca14b1

View File

@ -2539,7 +2539,7 @@ def _parse_repo_file(filename):
for section in parsed._sections:
section_dict = dict(parsed._sections[section])
section_dict.pop('__name__')
section_dict.pop('__name__', None)
config[section] = section_dict
# Try to extract leading comments