summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-03-21 09:00:55 +0000
committerGeorg Brandl <georg@python.org>2007-03-21 09:00:55 +0000
commit50d747e5f6e1c8c88c2dc5a56dd80f0f596240a3 (patch)
tree4664fd116a8b91c33e261189c49bcb566c36185e /Python
parent3cea06078c868f08055ffc690a00fd4f0b9a89c6 (diff)
downloadcpython-50d747e5f6e1c8c88c2dc5a56dd80f0f596240a3.tar.gz
Patch #1682205: a TypeError while unpacking an iterable is no longer
masked by a generic one with the message "unpack non-sequence". (backport from rev. 54480)
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 690b2be9b7..9dddd2ff2f 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -1765,12 +1765,10 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
PUSH(w);
}
} else if (unpack_iterable(v, oparg,
- stack_pointer + oparg))
+ stack_pointer + oparg)) {
stack_pointer += oparg;
- else {
- if (PyErr_ExceptionMatches(PyExc_TypeError))
- PyErr_SetString(PyExc_TypeError,
- "unpack non-sequence");
+ } else {
+ /* unpack_iterable() raised an exception */
why = WHY_EXCEPTION;
}
Py_DECREF(v);