##// END OF EJS Templates
Fix bug in ultraTB introduced by sync-editor branch.
Fernando Perez -
r1545:ed5b08e7 merge
parent child Browse files
Show More
@@ -459,8 +459,9 b' class ListTB(TBTools):'
459 try:
459 try:
460 msg, (filename, lineno, offset, line) = value
460 msg, (filename, lineno, offset, line) = value
461 except:
461 except:
462 pass
462 have_filedata = False
463 else:
463 else:
464 have_filedata = True
464 #print 'filename is',filename # dbg
465 #print 'filename is',filename # dbg
465 if not filename: filename = "<string>"
466 if not filename: filename = "<string>"
466 list.append('%s File %s"%s"%s, line %s%d%s\n' % \
467 list.append('%s File %s"%s"%s, line %s%d%s\n' % \
@@ -492,7 +493,8 b' class ListTB(TBTools):'
492 list.append('%s\n' % str(stype))
493 list.append('%s\n' % str(stype))
493
494
494 # vds:>>
495 # vds:>>
495 __IPYTHON__.hooks.synchronize_with_editor(filename, lineno, 0)
496 if have_filedata:
497 __IPYTHON__.hooks.synchronize_with_editor(filename, lineno, 0)
496 # vds:<<
498 # vds:<<
497
499
498 return list
500 return list
@@ -809,10 +811,10 b' class VerboseTB(TBTools):'
809
811
810 # vds: >>
812 # vds: >>
811 if records:
813 if records:
812 frame, file, lnum, func, lines, index = records[-1]
814 filepath, lnum = records[-1][1:3]
813 #print "file:", str(file), "linenb", str(lnum)
815 #print "file:", str(file), "linenb", str(lnum) # dbg
814 file = abspath(file)
816 filepath = os.path.abspath(filepath)
815 __IPYTHON__.hooks.synchronize_with_editor(file, lnum, 0)
817 __IPYTHON__.hooks.synchronize_with_editor(filepath, lnum, 0)
816 # vds: <<
818 # vds: <<
817
819
818 # return all our info assembled as a single string
820 # return all our info assembled as a single string
General Comments 0
You need to be logged in to leave comments. Login now