##// END OF EJS Templates
Clean up small leftover uses of raw streams in exception handling.
Fernando Perez -
Show More
@@ -429,9 +429,9 b' class ListTB(TBTools):'
429 ostream=ostream)
429 ostream=ostream)
430
430
431 def __call__(self, etype, value, elist):
431 def __call__(self, etype, value, elist):
432 io.Term.cout.flush()
432 self.ostream.flush()
433 io.Term.cerr.write(self.text(etype, value, elist))
433 self.ostream.write(self.text(etype, value, elist))
434 io.Term.cerr.write('\n')
434 self.ostream.write('\n')
435
435
436 def structured_traceback(self, etype, value, elist, tb_offset=None,
436 def structured_traceback(self, etype, value, elist, tb_offset=None,
437 context=5):
437 context=5):
@@ -742,7 +742,7 b' class VerboseTB(TBTools):'
742 # So far, I haven't been able to find an isolated example to
742 # So far, I haven't been able to find an isolated example to
743 # reproduce the problem.
743 # reproduce the problem.
744 inspect_error()
744 inspect_error()
745 traceback.print_exc(file=io.Term.cerr)
745 traceback.print_exc(file=self.ostream)
746 info('\nUnfortunately, your original traceback can not be constructed.\n')
746 info('\nUnfortunately, your original traceback can not be constructed.\n')
747 return ''
747 return ''
748
748
@@ -779,7 +779,7 b' class VerboseTB(TBTools):'
779 # able to remove this try/except when 2.4 becomes a
779 # able to remove this try/except when 2.4 becomes a
780 # requirement. Bug details at http://python.org/sf/1005466
780 # requirement. Bug details at http://python.org/sf/1005466
781 inspect_error()
781 inspect_error()
782 traceback.print_exc(file=io.Term.cerr)
782 traceback.print_exc(file=self.ostream)
783 info("\nIPython's exception reporting continues...\n")
783 info("\nIPython's exception reporting continues...\n")
784
784
785 if func == '?':
785 if func == '?':
@@ -800,7 +800,7 b' class VerboseTB(TBTools):'
800 # and barfs out. At some point I should dig into this one
800 # and barfs out. At some point I should dig into this one
801 # and file a bug report about it.
801 # and file a bug report about it.
802 inspect_error()
802 inspect_error()
803 traceback.print_exc(file=io.Term.cerr)
803 traceback.print_exc(file=self.ostream)
804 info("\nIPython's exception reporting continues...\n")
804 info("\nIPython's exception reporting continues...\n")
805 call = tpl_call_fail % func
805 call = tpl_call_fail % func
806
806
General Comments 0
You need to be logged in to leave comments. Login now