mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix case where no comments specified
This commit is contained in:
parent
ce391c53f4
commit
b70c3389da
1 changed files with 3 additions and 3 deletions
|
@ -2663,9 +2663,9 @@ def mod_repo(repo, basedir=None, **kwargs):
|
|||
filerepos[repo].update(repo_opts)
|
||||
content = header
|
||||
for stanza in six.iterkeys(filerepos):
|
||||
comments = filerepos[stanza].pop('comments', [])
|
||||
if comments:
|
||||
comments = salt.utils.pkg.rpm.combine_comments(comments)
|
||||
comments = salt.utils.pkg.rpm.combine_comments(
|
||||
filerepos[stanza].pop('comments', [])
|
||||
)
|
||||
content += '[{0}]\n'.format(stanza)
|
||||
for line in six.iterkeys(filerepos[stanza]):
|
||||
content += '{0}={1}\n'.format(
|
||||
|
|
Loading…
Add table
Reference in a new issue