fancyopts: restore use of callable() since it was readded in Python 3.2
authorAugie Fackler <raf@durin42.com>
Mon, 23 Jun 2014 09:24:16 -0400
changeset 21794 753af9ee7c81
parent 21793 e0b29a0c36c4
child 21795 711498bb4ff5
fancyopts: restore use of callable() since it was readded in Python 3.2
mercurial/fancyopts.py
--- a/mercurial/fancyopts.py	Mon Jun 23 09:23:57 2014 -0400
+++ b/mercurial/fancyopts.py	Mon Jun 23 09:24:16 2014 -0400
@@ -77,7 +77,7 @@
         # copy defaults to state
         if isinstance(default, list):
             state[name] = default[:]
-        elif getattr(default, '__call__', False):
+        elif callable(default):
             state[name] = None
         else:
             state[name] = default