From c8b6df90045a3f419e6fab272d93ad4159e54ccc Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 23 May 1997 00:06:51 +0000 Subject: PyObject_Compare can raise an exception now. --- Python/compile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Python/compile.c') diff --git a/Python/compile.c b/Python/compile.c index 155142aa8b..36304e38e7 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -666,7 +666,8 @@ com_add(c, list, v) if (v->ob_type == w->ob_type && PyObject_Compare(v, w) == 0) return i; } - if (PyList_Append(list, v) != 0) + /* Check for error from PyObject_Compare */ + if (PyErr_Occurred() || PyList_Append(list, v) != 0) c->c_errors++; return n; } -- cgit v1.2.1