~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/help.py

  • Committer: Robert Collins
  • Date: 2007-04-20 00:34:03 UTC
  • mto: This revision was merged to the branch mainline in revision 2441.
  • Revision ID: robertc@robertcollins.net-20070420003403-0055vwwp20sdtpti
HelpContexts.search now returns the found topics.

Show diffs side-by-side

added added

removed removed

Lines of Context:
196
196
        
197
197
        :param topic: A string naming the help topic to search for.
198
198
        :raises: NoHelpTopic if none of the contexts in search_path have topic.
 
199
        :return: A list of HelpTopics which matched 'topic'.
199
200
        """
200
201
        result = []
201
202
        for context in self.search_path:
202
203
            result.extend(context.get_topics(topic))
203
204
        if not result:
204
205
            raise errors.NoHelpTopic(topic)
 
206
        else:
 
207
            return result