mercurial/extensions.py
changeset 21795 711498bb4ff5
parent 21229 54d7657d7d1e
child 21848 ecdbbb6e5d06
--- a/mercurial/extensions.py	Mon Jun 23 09:24:16 2014 -0400
+++ b/mercurial/extensions.py	Mon Jun 23 09:24:06 2014 -0400
@@ -138,7 +138,7 @@
     where orig is the original (wrapped) function, and *args, **kwargs
     are the arguments passed to it.
     '''
-    assert util.safehasattr(wrapper, '__call__')
+    assert callable(wrapper)
     aliases, entry = cmdutil.findcmd(command, table)
     for alias, e in table.iteritems():
         if e is entry:
@@ -191,12 +191,12 @@
     your end users, you should play nicely with others by using the
     subclass trick.
     '''
-    assert util.safehasattr(wrapper, '__call__')
+    assert callable(wrapper)
     def wrap(*args, **kwargs):
         return wrapper(origfn, *args, **kwargs)
 
     origfn = getattr(container, funcname)
-    assert util.safehasattr(origfn, '__call__')
+    assert callable(origfn)
     setattr(container, funcname, wrap)
     return origfn