Patchwork [2,of,8] check-seclevel: 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 <7ebee84b9fcfb223f43d.1403635058@augie-macbookair>
Download mbox | patch
Permalink /patch/5055/
State Accepted
Commit e15c991fe2ec82944fcaf9a7696c78f07080e30d
Headers show

Comments

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

Patch

diff --git a/doc/check-seclevel.py b/doc/check-seclevel.py
--- a/doc/check-seclevel.py
+++ b/doc/check-seclevel.py
@@ -87,7 +87,7 @@ 
 def checkhghelps():
     errorcnt = 0
     for names, sec, doc in helptable:
-        if util.safehasattr(doc, '__call__'):
+        if callable(doc):
             doc = doc()
         errorcnt += checkseclevel(doc,
                                   '%s help topic' % names[0],