]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Don't use printobject() to print a string (filename).
authorGuido van Rossum <guido@python.org>
Mon, 24 Jun 1991 22:25:27 +0000 (22:25 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 24 Jun 1991 22:25:27 +0000 (22:25 +0000)
Print ';' instead of ',' between file and line for MPW.

Python/traceback.c

index e71f6fa160300f09bf1d52c5046da1149c7d4311..f3a1358cf60b58b89535ac91492d77f91a9cc297 100644 (file)
@@ -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);