From b68994a3dd5c95c366fc3f105d7d993981167cf7 2014-05-08 22:54:24 From: MinRK Date: 2014-05-08 22:54:24 Subject: [PATCH] Backport PR #5818: interpret any exception in getcallargs as not callable some object (mock) lie to callable closes #5817 --- diff --git a/IPython/core/formatters.py b/IPython/core/formatters.py index f2fa9bb..4146656 100644 --- a/IPython/core/formatters.py +++ b/IPython/core/formatters.py @@ -76,7 +76,7 @@ def _valid_formatter(f): # anything that works with zero args should be okay try: inspect.getcallargs(f) - except TypeError: + except Exception: return False else: return True