[PATCH 6 of 8] help: restore use of callable() since it was readded in Python 3.2

Augie Fackler raf at durin42.com
Tue Jun 24 13:37:42 CDT 2014


# HG changeset patch
# User Augie Fackler <raf at durin42.com>
# Date 1403529864 14400
#      Mon Jun 23 09:24:24 2014 -0400
# Node ID 2bc882dca6c612558554cd777c9e972b21f6e9c8
# Parent  0abeffaea6694e3c6009586c67d3194807ea32e0
help: restore use of callable() since it was readded in Python 3.2

diff --git a/mercurial/help.py b/mercurial/help.py
--- a/mercurial/help.py
+++ b/mercurial/help.py
@@ -404,7 +404,7 @@
         # description
         if not doc:
             rst.append("    %s\n" % _("(no help text available)"))
-        if util.safehasattr(doc, '__call__'):
+        if callable(doc):
             rst += ["    %s\n" % l for l in doc().splitlines()]
 
         if not ui.verbose:


More information about the Mercurial-devel mailing list