From ace81e3a57cb86e774426ef48d8f9cfd9ede2b2b Mon Sep 17 00:00:00 2001 From: Jeroen Demeyer Date: Wed, 5 Jul 2017 17:04:33 +0200 Subject: [PATCH] Compare as str, not unicode and str --- IPython/core/ultratb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/core/ultratb.py b/IPython/core/ultratb.py index 98e2cd586fa..b24752964c4 100644 --- a/IPython/core/ultratb.py +++ b/IPython/core/ultratb.py @@ -438,7 +438,7 @@ def is_recursion_error(etype, value, records): # by stack frames in IPython itself. >500 frames probably indicates # a recursion error. return (etype is recursion_error_type) \ - and "recursion" in str(value).lower() \ + and str("recursion") in str(value).lower() \ and len(records) > 500 def find_recursion(etype, value, records):