diff options
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c index 155142a..36304e3 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; } |