diff options
author | smosker <smosker@yandex-team.ru> | 2022-02-10 16:48:21 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:21 +0300 |
commit | dd14d17a747a9c259858faf2fcc3ea6b92df4e15 (patch) | |
tree | f332cd81782832c17c48d8c3b4511924cd9e47fd /contrib/python/ipython/py2/IPython/core/ultratb.py | |
parent | b637e2fa3213638fbabe52c15dad14c8237945ac (diff) | |
download | ydb-dd14d17a747a9c259858faf2fcc3ea6b92df4e15.tar.gz |
Restoring authorship annotation for <smosker@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/ipython/py2/IPython/core/ultratb.py')
-rw-r--r-- | contrib/python/ipython/py2/IPython/core/ultratb.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/contrib/python/ipython/py2/IPython/core/ultratb.py b/contrib/python/ipython/py2/IPython/core/ultratb.py index a855145825..2977e9109b 100644 --- a/contrib/python/ipython/py2/IPython/core/ultratb.py +++ b/contrib/python/ipython/py2/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 str("recursion") in str(value).lower() \ + and str("recursion") in str(value).lower() \ and len(records) > 500 def find_recursion(etype, value, records): @@ -1130,12 +1130,12 @@ class VerboseTB(TBTools): # problems, but it generates empty tracebacks for console errors # (5 blanks lines) where none should be returned. return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset) - except UnicodeDecodeError: - # This can occur if a file's encoding magic comment is wrong. - # I can't see a way to recover without duplicating a bunch of code - # from the stdlib traceback module. --TK - error('\nUnicodeDecodeError while processing traceback.\n') - return None + except UnicodeDecodeError: + # This can occur if a file's encoding magic comment is wrong. + # I can't see a way to recover without duplicating a bunch of code + # from the stdlib traceback module. --TK + error('\nUnicodeDecodeError while processing traceback.\n') + return None except: # FIXME: I've been getting many crash reports from python 2.3 # users, traceable to inspect.py. If I can find a small test-case @@ -1227,7 +1227,7 @@ class VerboseTB(TBTools): if force or self.call_pdb: if self.pdb is None: - self.pdb = self.debugger_cls() + self.pdb = self.debugger_cls() # the system displayhook may have changed, restore the original # for pdb display_trap = DisplayTrap(hook=sys.__displayhook__) |