Autoregister checks only once (by name) so checks (and configs) can import each other without resulting in multiple instances of a particular check being run.

git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1328 9bc8b190-ac0f-0410-8968-dc7d1f502856
This commit is contained in:
Ville Skyttä 2007-03-15 22:41:30 +00:00
parent 7ac6fb9a2d
commit 709bb286f5
1 changed files with 5 additions and 2 deletions

View File

@ -8,10 +8,13 @@
#############################################################################
class AbstractCheck:
checks=[]
check_names_seen = []
checks = []
def __init__(self, name):
AbstractCheck.checks.append(self)
if name not in AbstractCheck.check_names_seen:
AbstractCheck.checks.append(self)
AbstractCheck.check_names_seen.append(name)
self.name = name
def check(self, pkg):