From ed46a87463a5cf383399bd080435d9e2ea0f8529 2013-08-29 21:43:49 From: MinRK Date: 2013-08-29 21:43:49 Subject: [PATCH] Backport PR #4132: Fixed name error bug in function safe_unicode in module py3compat. --- diff --git a/IPython/utils/py3compat.py b/IPython/utils/py3compat.py index 9731368..f52a80d 100644 --- a/IPython/utils/py3compat.py +++ b/IPython/utils/py3compat.py @@ -60,12 +60,12 @@ def safe_unicode(e): pass try: - return py3compat.str_to_unicode(str(e)) + return str_to_unicode(str(e)) except UnicodeError: pass try: - return py3compat.str_to_unicode(repr(e)) + return str_to_unicode(repr(e)) except UnicodeError: pass