~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/registry.py

  • Committer: John Arbash Meinel
  • Date: 2006-09-09 18:19:01 UTC
  • mto: This revision was merged to the branch mainline in revision 2074.
  • Revision ID: john@arbash-meinel.com-20060909181901-93302c1b51b375ba
A help callable should take the registry as the first parameter

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        :param key: This is the key to use to request the object later.
41
41
        :param object: The object to register.
42
42
        :param help: Help text for this entry. This may be a string or
43
 
                a callable. If it is a callable, it should take a
44
 
                single parameter, which is the key that the help was
 
43
                a callable. If it is a callable, it should take two
 
44
                parameters, this registry and the key that the help was
45
45
                registered under.
46
46
        :param info: More information for this entry. Registry.get_info()
47
47
                can be used to get this information. It is meant as an
133
133
        """Get the help text associated with the given key"""
134
134
        the_help = self._help_dict[self._get_key_or_default(key)]
135
135
        if callable(the_help):
136
 
            return the_help(key)
 
136
            return the_help(self, key)
137
137
        return the_help
138
138
 
139
139
    def get_info(self, key=None):