summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2000-08-20 14:01:53 (GMT)
committerThomas Wouters <thomas@python.org>2000-08-20 14:01:53 (GMT)
commit0400515ff00493c3b7634cebffaba63a3bf2accd (patch)
treea2581a01ed734cb38f71d3382d0cc837d8e8efb6 /Python/ceval.c
parent84f28db66a5f4ac86d42250b455fc4a1ca7824e3 (diff)
downloadcpython-0400515ff00493c3b7634cebffaba63a3bf2accd.zip
cpython-0400515ff00493c3b7634cebffaba63a3bf2accd.tar.gz
cpython-0400515ff00493c3b7634cebffaba63a3bf2accd.tar.bz2
Fix the bug Sjoerd Mullender discovered, where find_from_args() wasn't
trying hard enough to find out what the arguments to an import were. There is no test-case for this bug, yet, but this is what it looked like: from encodings import cp1006, cp1026 ImportError: cannot import name cp1026 '__import__' was called with only the first name in the 'arguments' list.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 92fa887..9167abe 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -2864,7 +2864,9 @@ find_from_args(PyFrameObject *f, int nexti)
} else {
do {
oparg = (next_instr[1]<<8) + next_instr[0];
- next_instr += 2;
+ /* Jump over our own argument, the next instruction
+ (which is a STORE), and its argument.*/
+ next_instr += 5;
name = Getnamev(f, oparg);
if (PyList_Append(list, name) < 0) {
Py_DECREF(list);