summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-02-28 20:58:04 +0000
committerFred Drake <fdrake@acm.org>2001-02-28 20:58:04 +0000
commit6261f2f619cbef5c2a3541a47b76ce1a5bf1c335 (patch)
tree3ad4cf52759633849404398412f56730474c5345 /Python/pythonrun.c
parentd4b3004949e46a4b3439765c8c9342f189b729e9 (diff)
downloadcpython-6261f2f619cbef5c2a3541a47b76ce1a5bf1c335.tar.gz
Now that Jeremy is asking about this code, it looks really bogus to me,
so let's rip it out. The constructor for SyntaxError does the right thing, so we do not need to do it again.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 40611b6c5e..7d73395fd0 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -1096,24 +1096,6 @@ err_input(perrdetail *err)
w = Py_BuildValue("(sO)", msg, v);
PyErr_SetObject(errtype, w);
Py_XDECREF(w);
-
- if (v != NULL) {
- PyObject *exc, *tb;
-
- PyErr_Fetch(&errtype, &exc, &tb);
- PyErr_NormalizeException(&errtype, &exc, &tb);
- if (PyObject_SetAttrString(exc, "filename",
- PyTuple_GET_ITEM(v, 0)))
- PyErr_Clear();
- if (PyObject_SetAttrString(exc, "lineno",
- PyTuple_GET_ITEM(v, 1)))
- PyErr_Clear();
- if (PyObject_SetAttrString(exc, "offset",
- PyTuple_GET_ITEM(v, 2)))
- PyErr_Clear();
- Py_DECREF(v);
- PyErr_Restore(errtype, exc, tb);
- }
}
/* Print fatal error message and abort */