New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception name improperly indented #46951
Comments
The new warnings implementation tweaks how tracebacks are printed. This Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError not:: Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError |
Forgot to mention this is probably from Python/traceback.c:tb_displayline(). |
It looks like you can just remove the offending line like so: Index: Python/traceback.c --- Python/traceback.c (revision 62515)
+++ Python/traceback.c (working copy)
@@ -222,8 +222,7 @@
err = PyFile_WriteString(linebuf, f);
if (err != 0)
return err;
-
- err = PyFile_WriteString(" ", f);
+
return Py_DisplaySourceLine(f, filename, lineno);
} |
Yep. I already did that and ran the unit test suite to verify. Now I am |
You could add a function to the _testcapi module to invoke PyErr_Display. |
On Sun, Apr 27, 2008 at 2:34 AM, Georg Brandl <report@bugs.python.org> wrote:
That's true and probably the only sane idea. |
Fix in revision 62555. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: