-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement
Sections.get_or_create()
(#441)
Implement `Sections.get_or_create()` Fixes #404. RELEASE NOTES BEGIN There is a new convenience method Sections.get_or_create() that allows you to manipulate a section without checking if it exists first. If a section doesn't exist, it will be appended to the end. For example, this will work properly even on spec files without %changelog: with spec.sections() as sections: changelog = sections.get_or_create("changelog") changelog[:] = ["%autochangelog"] RELEASE NOTES END Reviewed-by: František Lachman <[email protected]>
- Loading branch information
Showing
2 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters