summaryrefslogtreecommitdiffstats
path: root/Python/traceback.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1991-06-07 22:35:42 (GMT)
committerGuido van Rossum <guido@python.org>1991-06-07 22:35:42 (GMT)
commitd783a46d73d92e9a79ef123dc6b422568e1aad69 (patch)
tree618f954c179d3b0dd21bbbd6527ecb5da0b5aea7 /Python/traceback.c
parent909336104b70cae29c0c4fde4477d508e1d709ac (diff)
downloadcpython-d783a46d73d92e9a79ef123dc6b422568e1aad69.zip
cpython-d783a46d73d92e9a79ef123dc6b422568e1aad69.tar.gz
cpython-d783a46d73d92e9a79ef123dc6b422568e1aad69.tar.bz2
printobject now returns an error code
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),