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:
parent
7ac6fb9a2d
commit
709bb286f5
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue