doc/gendoc.py
changeset 14943 d3bb825ddae3
parent 14461 f5b0834cf685
child 16683 525fdb738975
--- a/doc/gendoc.py	Mon Jul 25 14:59:55 2011 -0500
+++ b/doc/gendoc.py	Mon Jul 25 16:24:37 2011 -0500
@@ -9,6 +9,7 @@
 from mercurial.i18n import _
 from mercurial.help import helptable
 from mercurial import extensions
+from mercurial import util
 
 def get_desc(docstr):
     if not docstr:
@@ -95,7 +96,7 @@
             ui.write(".. _%s:\n" % name)
         ui.write("\n")
         section(ui, sec)
-        if hasattr(doc, '__call__'):
+        if util.safehasattr(doc, '__call__'):
             doc = doc()
         ui.write(doc)
         ui.write("\n")