##// END OF EJS Templates
Use inplace addition in ultratb.
Thomas Kluyver -
r5831:f5647d9d
parent child
Show More
@@ -514,7 +514,7 class ListTB(TBTools):
514 Colors.lineno, lineno, Colors.Normal,
514 Colors.lineno, lineno, Colors.Normal,
515 Colors.name, name, Colors.Normal)
515 Colors.name, name, Colors.Normal)
516 if line:
516 if line:
517 item = item + ' %s\n' % line.strip()
517 item += ' %s\n' % line.strip()
518 list.append(item)
518 list.append(item)
519 # Emphasize the last entry
519 # Emphasize the last entry
520 filename, lineno, name, line = extracted_list[-1]
520 filename, lineno, name, line = extracted_list[-1]
@@ -525,7 +525,7 class ListTB(TBTools):
525 Colors.nameEm, name, Colors.normalEm,
525 Colors.nameEm, name, Colors.normalEm,
526 Colors.Normal)
526 Colors.Normal)
527 if line:
527 if line:
528 item = item + '%s %s%s\n' % (Colors.line, line.strip(),
528 item += '%s %s%s\n' % (Colors.line, line.strip(),
529 Colors.Normal)
529 Colors.Normal)
530 list.append(item)
530 list.append(item)
531 #from pprint import pformat; print 'LISTTB', pformat(list) # dbg
531 #from pprint import pformat; print 'LISTTB', pformat(list) # dbg
@@ -564,7 +564,7 class ListTB(TBTools):
564 if value.text is not None:
564 if value.text is not None:
565 i = 0
565 i = 0
566 while i < len(value.text) and value.text[i].isspace():
566 while i < len(value.text) and value.text[i].isspace():
567 i = i+1
567 i += 1
568 list.append('%s %s%s\n' % (Colors.line,
568 list.append('%s %s%s\n' % (Colors.line,
569 value.text.strip(),
569 value.text.strip(),
570 Colors.Normal))
570 Colors.Normal))
@@ -572,9 +572,9 class ListTB(TBTools):
572 s = ' '
572 s = ' '
573 for c in value.text[i:value.offset-1]:
573 for c in value.text[i:value.offset-1]:
574 if c.isspace():
574 if c.isspace():
575 s = s + c
575 s += c
576 else:
576 else:
577 s = s + ' '
577 s += ' '
578 list.append('%s%s^%s\n' % (Colors.caret, s,
578 list.append('%s%s^%s\n' % (Colors.caret, s,
579 Colors.Normal) )
579 Colors.Normal) )
580
580
General Comments 0
You need to be logged in to leave comments. Login now