diff Python/pythonrun.c @ 16845:09dcf5ebcd80 legacy-trunk

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.
author Fred Drake <fdrake@acm.org>
date Wed, 28 Feb 2001 20:58:04 +0000
parents 27f04d714ecb
children b0456d3a0f1f
line wrap: on
line diff
--- a/Python/pythonrun.c	Wed Feb 28 20:56:49 2001 +0000
+++ b/Python/pythonrun.c	Wed Feb 28 20:58:04 2001 +0000
@@ -1096,24 +1096,6 @@
 	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 */