##// END OF EJS Templates
Fixed bug in ultratb.py and io.py....
Brian Granger -
Show More
@@ -385,7 +385,8 b' class ListTB(TBTools):'
385
385
386 def __call__(self, etype, value, elist):
386 def __call__(self, etype, value, elist):
387 Term.cout.flush()
387 Term.cout.flush()
388 Term.cerr.writeln(self.text(etype,value,elist))
388 Term.cerr.write(self.text(etype,value,elist))
389 Term.cerr.write('\n')
389
390
390 def text(self, etype, value, elist, context=5):
391 def text(self, etype, value, elist, context=5):
391 """Return a color formatted string with the traceback info.
392 """Return a color formatted string with the traceback info.
@@ -910,7 +911,8 b' class VerboseTB(TBTools):'
910 (etype, evalue, etb) = info or sys.exc_info()
911 (etype, evalue, etb) = info or sys.exc_info()
911 self.tb = etb
912 self.tb = etb
912 Term.cout.flush()
913 Term.cout.flush()
913 Term.cerr.writeln(self.text(etype, evalue, etb))
914 Term.cerr.write(self.text(etype, evalue, etb))
915 Term.cerr.write('\n')
914
916
915 # Changed so an instance can just be called as VerboseTB_inst() and print
917 # Changed so an instance can just be called as VerboseTB_inst() and print
916 # out the right info on its own.
918 # out the right info on its own.
@@ -47,9 +47,9 b' class IOStream:'
47 print >> sys.stderr, \
47 print >> sys.stderr, \
48 'ERROR - failed to write data to stream:', self.stream
48 'ERROR - failed to write data to stream:', self.stream
49
49
50 def writeln(self, data):
50 # This class used to have a writeln method, but regular files and streams
51 self.write(data)
51 # in Python don't have this method. We need to keep this completely
52 self.write('\n')
52 # compatible so we removed it.
53
53
54 def close(self):
54 def close(self):
55 pass
55 pass
General Comments 0
You need to be logged in to leave comments. Login now