summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1991-06-24 22:25:27 (GMT)
committerGuido van Rossum <guido@python.org>1991-06-24 22:25:27 (GMT)
commit247ff718df8114880be4af96bfd5191fcd995a11 (patch)
tree9208ee71c0abc1ea2469715de08b6b80d0040b0f /Python
parent1d2a9ade93c3f7e526c3bd2d8e6490b151c188ff (diff)
downloadcpython-247ff718df8114880be4af96bfd5191fcd995a11.zip
cpython-247ff718df8114880be4af96bfd5191fcd995a11.tar.gz
cpython-247ff718df8114880be4af96bfd5191fcd995a11.tar.bz2
Don't use printobject() to print a string (filename).
Print ';' instead of ',' between file and line for MPW.
Diffstat (limited to 'Python')
-rw-r--r--Python/traceback.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/Python/traceback.c b/Python/traceback.c
index e71f6fa..f3a1358 100644
--- a/Python/traceback.c
+++ b/Python/traceback.c
@@ -188,13 +188,16 @@ tb_printinternal(tb, fp)
while (tb != NULL) {
if (intrcheck())
break;
- fprintf(fp, " File \"");
- if (printobject(tb->tb_frame->f_code->co_filename,
- fp, PRINT_RAW) != 0) {
- err_clear();
- break;
- }
- fprintf(fp, "\", line %d\n", tb->tb_lineno);
+ fprintf(fp, " File \"%s\"",
+ getstringvalue(tb->tb_frame->f_code->co_filename));
+#ifdef applec /* MPW */
+ /* This is needed by MPW's File and Line commands */
+ fprintf(fp, "; ");
+#else
+ /* This is needed by Emacs' compile command */
+ fprintf(fp, ", ");
+#endif
+ fprintf(fp, "line %d\n", tb->tb_lineno);
tb_displayline(fp,
getstringvalue(tb->tb_frame->f_code->co_filename),
tb->tb_lineno);