| |
@@ -581,7 +581,7 @@
|
| |
other_before = False
|
| |
command_pattern = re.compile(r"/gpgverify ")
|
| |
comment_pattern = re.compile(r"^[ \t]*#")
|
| |
- for line in self.spec.get_section("prep"):
|
| |
+ for line in self.spec.get_section("prep") or []:
|
| |
if comment_pattern.match(line) is None:
|
| |
if command_pattern.search(line) is None:
|
| |
other_seen = True
|
| |
Having a
%prep
section is not mandatory (it generates an rpmlint warning, not error), but not having it causes the gpgverify SHOULD plugin to fail as it assumes the section exists.Handle this by using
or []
before iterating over the section's lines,as
get_section
returnsNone
on non-existent sections.Fixes #448.
Signed-off-by: Michel Alexandre Salim salimma@fedoraproject.org