summaryrefslogtreecommitdiffstats
path: root/Python/traceback.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/traceback.c')
-rw-r--r--Python/traceback.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/Python/traceback.c b/Python/traceback.c
index 0b6904f..e71f6fa 100644
--- a/Python/traceback.c
+++ b/Python/traceback.c
@@ -186,12 +186,14 @@ tb_printinternal(tb, fp)
FILE *fp;
{
while (tb != NULL) {
- if (intrcheck()) {
- fprintf(fp, "[interrupted]\n");
+ if (intrcheck())
break;
- }
fprintf(fp, " File \"");
- printobject(tb->tb_frame->f_code->co_filename, fp, PRINT_RAW);
+ if (printobject(tb->tb_frame->f_code->co_filename,
+ fp, PRINT_RAW) != 0) {
+ err_clear();
+ break;
+ }
fprintf(fp, "\", line %d\n", tb->tb_lineno);
tb_displayline(fp,
getstringvalue(tb->tb_frame->f_code->co_filename),