diff --git a/britney.py b/britney.py index 8350111..5b41e8b 100755 --- a/britney.py +++ b/britney.py @@ -496,6 +496,9 @@ class Britney(object): self.policies.append(AgePolicy(self.options, MINDAYS)) self.policies.append(RCBugPolicy(self.options)) + for policy in self.policies: + policy.register_hints(self._hint_parser) + @property def hints(self): return self._hint_parser.hints diff --git a/policies/policy.py b/policies/policy.py index 5e8329f..c49dd01 100644 --- a/policies/policy.py +++ b/policies/policy.py @@ -66,6 +66,13 @@ class BasePolicy(object): if self.options.verbose or type in ("E", "W"): print("%s: [%s] - %s" % (type, time.asctime(), msg)) + def register_hints(self, hint_parser): + """Register new hints that this policy accepts + + :param hint_parser: An instance of HintParser (see HintParser.register_hint_type) + """ + pass + def initialise(self, britney): """Called once to make the policy initialise any data structures