Better error message. Fixed bug when no files are present. (Michael Scherer)
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@835 9bc8b190-ac0f-0410-8968-dc7d1f502856
This commit is contained in:
parent
b52079eb0f
commit
eb7705d32c
|
@ -47,13 +47,15 @@ class NamingPolicyCheck(AbstractCheck.AbstractCheck):
|
|||
details="The name should match this regular expression " + name_re
|
||||
|
||||
addDetails(pkg_name + '-naming-policy-not-applied',
|
||||
"""This package doesn't respect the naming policy.
|
||||
""" + details)
|
||||
"This package doesn't respect the naming policy.\n"
|
||||
+ details + ".\nIt should only be used for separate packages modules.")
|
||||
|
||||
def check(self, pkg):
|
||||
if pkg.isSource():
|
||||
return
|
||||
list=pkg[rpm.RPMTAG_FILENAMES]
|
||||
if not list:
|
||||
return
|
||||
try:
|
||||
for c in self.checks_:
|
||||
for f in list:
|
||||
|
|
Loading…
Reference in New Issue