##// END OF EJS Templates
Fix for displaying variables in verbose traceback.
Thomas Kluyver -
Show More
@@ -786,13 +786,19 b' class VerboseTB(TBTools):'
786 abspath = os.path.abspath
786 abspath = os.path.abspath
787 for frame, file, lnum, func, lines, index in records:
787 for frame, file, lnum, func, lines, index in records:
788 #print '*** record:',file,lnum,func,lines,index # dbg
788 #print '*** record:',file,lnum,func,lines,index # dbg
789 try:
789
790 file = file and abspath(file) or '?'
790 if not file:
791 except OSError:
791 file = '?'
792 # if file is '<console>' or something not in the filesystem,
792 elif not(file.startswith("<") and file.endswith(">")):
793 # the abspath call will throw an OSError. Just ignore it and
793 # Guess that filenames like <string> aren't real filenames, so
794 # keep the original file string.
794 # don't call abspath on them.
795 pass
795 try:
796 file = abspath(file)
797 except OSError:
798 # Not sure if this can still happen: abspath now works with
799 # file names like <string>
800 pass
801
796 link = tpl_link % file
802 link = tpl_link % file
797 args, varargs, varkw, locals = inspect.getargvalues(frame)
803 args, varargs, varkw, locals = inspect.getargvalues(frame)
798
804
General Comments 0
You need to be logged in to leave comments. Login now