mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue