Show More
@@ -786,13 +786,19 b' class VerboseTB(TBTools):' | |||
|
786 | 786 | abspath = os.path.abspath |
|
787 | 787 | for frame, file, lnum, func, lines, index in records: |
|
788 | 788 | #print '*** record:',file,lnum,func,lines,index # dbg |
|
789 | try: | |
|
790 | file = file and abspath(file) or '?' | |
|
791 | except OSError: | |
|
792 | # if file is '<console>' or something not in the filesystem, | |
|
793 | # the abspath call will throw an OSError. Just ignore it and | |
|
794 | # keep the original file string. | |
|
795 |
|
|
|
789 | ||
|
790 | if not file: | |
|
791 | file = '?' | |
|
792 | elif not(file.startswith("<") and file.endswith(">")): | |
|
793 | # Guess that filenames like <string> aren't real filenames, so | |
|
794 | # don't call abspath on them. | |
|
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 | 802 | link = tpl_link % file |
|
797 | 803 | args, varargs, varkw, locals = inspect.getargvalues(frame) |
|
798 | 804 |
General Comments 0
You need to be logged in to leave comments.
Login now