Patchwork [3,of,8] gendoc: restore use of callable() since it was readded in Python 3.2

login
register
mail settings
Submitter Augie Fackler
Date June 24, 2014, 6:37 p.m.
Message ID <973a41fae77f5056dc4e.1403635059@augie-macbookair>
Download mbox | patch
Permalink /patch/5056/
State Accepted
Commit e0b29a0c36c4b7d8fc6c1f3992c88b684576eadf
Headers show

Comments

Augie Fackler - June 24, 2014, 6:37 p.m.
# HG changeset patch
# User Augie Fackler <raf@durin42.com>
# Date 1403529837 14400
#      Mon Jun 23 09:23:57 2014 -0400
# Node ID 973a41fae77f5056dc4e5fab0c07227b5d1c8b7e
# Parent  7ebee84b9fcfb223f43de6800893771b399d1b0e
gendoc: restore use of callable() since it was readded in Python 3.2

Patch

diff --git a/doc/gendoc.py b/doc/gendoc.py
--- a/doc/gendoc.py
+++ b/doc/gendoc.py
@@ -137,7 +137,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")