gendoc: restore use of callable() since it was readded in Python 3.2
authorAugie Fackler <raf@durin42.com>
Mon, 23 Jun 2014 09:23:57 -0400
changeset 21793 e0b29a0c36c4
parent 21792 e15c991fe2ec
child 21794 753af9ee7c81
gendoc: restore use of callable() since it was readded in Python 3.2
doc/gendoc.py
--- a/doc/gendoc.py	Mon Jun 23 09:23:47 2014 -0400
+++ b/doc/gendoc.py	Mon Jun 23 09:23:57 2014 -0400
@@ -14,7 +14,6 @@
 from mercurial.i18n import gettext, _
 from mercurial.help import helptable, loaddoc
 from mercurial import extensions
-from mercurial import util
 
 def get_desc(docstr):
     if not docstr:
@@ -137,7 +136,7 @@
         ui.write("\n")
         if sectionfunc:
             ui.write(sectionfunc(sec))
-        if util.safehasattr(doc, '__call__'):
+        if callable(doc):
             doc = doc()
         ui.write(doc)
         ui.write("\n")