##// END OF EJS Templates
Backport PR #2503: Fix traceback handling of SyntaxErrors without line numbers....
MinRK -
Show More
@@ -567,10 +567,14 b' class ListTB(TBTools):'
567 have_filedata = True
567 have_filedata = True
568 #print 'filename is',filename # dbg
568 #print 'filename is',filename # dbg
569 if not value.filename: value.filename = "<string>"
569 if not value.filename: value.filename = "<string>"
570 list.append('%s File %s"%s"%s, line %s%d%s\n' % \
570 if value.lineno:
571 lineno = value.lineno
572 else:
573 lineno = 'unknown'
574 list.append('%s File %s"%s"%s, line %s%s%s\n' % \
571 (Colors.normalEm,
575 (Colors.normalEm,
572 Colors.filenameEm, value.filename, Colors.normalEm,
576 Colors.filenameEm, value.filename, Colors.normalEm,
573 Colors.linenoEm, value.lineno, Colors.Normal ))
577 Colors.linenoEm, lineno, Colors.Normal ))
574 if value.text is not None:
578 if value.text is not None:
575 i = 0
579 i = 0
576 while i < len(value.text) and value.text[i].isspace():
580 while i < len(value.text) and value.text[i].isspace():
General Comments 0
You need to be logged in to leave comments. Login now