##// END OF EJS Templates
help: only call doc() when it is callable...
Gregory Szorc -
r22322:e284de13 stable
parent child Browse files
Show More
@@ -86,9 +86,10 b' def topicmatch(kw):'
86 'extensioncommands': [],
86 'extensioncommands': [],
87 }
87 }
88 for names, header, doc in helptable:
88 for names, header, doc in helptable:
89 # Old extensions may use a str as doc.
89 if (sum(map(lowercontains, names))
90 if (sum(map(lowercontains, names))
90 or lowercontains(header)
91 or lowercontains(header)
91 or lowercontains(doc())):
92 or (callable(doc) and lowercontains(doc()))):
92 results['topics'].append((names[0], header))
93 results['topics'].append((names[0], header))
93 import commands # avoid cycle
94 import commands # avoid cycle
94 for cmd, entry in commands.table.iteritems():
95 for cmd, entry in commands.table.iteritems():
General Comments 0
You need to be logged in to leave comments. Login now