mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
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:
parent
f6c16935d8
commit
433bca14b1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user