##// END OF EJS Templates
i1673 fix py2 bug in ultratb
Justyna Ilczuk -
Show More
@@ -934,6 +934,7 b' class VerboseTB(TBTools):'
934 for name in names:
934 for name in names:
935 value = text_repr(getattr(evalue, name))
935 value = text_repr(getattr(evalue, name))
936 exception.append('\n%s%s = %s' % (indent, name, value))
936 exception.append('\n%s%s = %s' % (indent, name, value))
937
937 return exception
938 return exception
938
939
939 def format_exception_as_a_whole(self, etype, evalue, etb, number_of_lines_of_context, tb_offset):
940 def format_exception_as_a_whole(self, etype, evalue, etb, number_of_lines_of_context, tb_offset):
@@ -968,7 +969,6 b' class VerboseTB(TBTools):'
968 # (5 blanks lines) where none should be returned.
969 # (5 blanks lines) where none should be returned.
969 return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
970 return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
970 except:
971 except:
971
972 # FIXME: I've been getting many crash reports from python 2.3
972 # FIXME: I've been getting many crash reports from python 2.3
973 # users, traceable to inspect.py. If I can find a small test-case
973 # users, traceable to inspect.py. If I can find a small test-case
974 # to reproduce this, I should either write a better workaround or
974 # to reproduce this, I should either write a better workaround or
@@ -995,8 +995,6 b' class VerboseTB(TBTools):'
995 def structured_traceback(self, etype, evalue, etb, tb_offset=None,
995 def structured_traceback(self, etype, evalue, etb, tb_offset=None,
996 number_of_lines_of_context=5):
996 number_of_lines_of_context=5):
997 """Return a nice text document describing the traceback."""
997 """Return a nice text document describing the traceback."""
998
999
1000 structured_traceback_parts = []
998 structured_traceback_parts = []
1001
999
1002 if py3compat.PY3:
1000 if py3compat.PY3:
@@ -1018,8 +1016,7 b' class VerboseTB(TBTools):'
1018 else:
1016 else:
1019 formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb, number_of_lines_of_context,
1017 formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb, number_of_lines_of_context,
1020 tb_offset)
1018 tb_offset)
1021 structured_traceback_parts.append(formatted_exception)
1019 structured_traceback_parts = formatted_exception[0]
1022
1023 return structured_traceback_parts
1020 return structured_traceback_parts
1024
1021
1025 def debugger(self, force=False):
1022 def debugger(self, force=False):
General Comments 0
You need to be logged in to leave comments. Login now