summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>2005-10-23 03:45:42 (GMT)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>2005-10-23 03:45:42 (GMT)
commitac699efad8ec4967db47d719df29b2f30cc5ee54 (patch)
tree659d722e6bd0e7f42c568eab9fbd4ce36f82fa8b /Python/compile.c
parent147b75931df421b9531cadadd3e182bae542c137 (diff)
downloadcpython-ac699efad8ec4967db47d719df29b2f30cc5ee54.zip
cpython-ac699efad8ec4967db47d719df29b2f30cc5ee54.tar.gz
cpython-ac699efad8ec4967db47d719df29b2f30cc5ee54.tar.bz2
Don't stop generating code for import statements after the first "import as"
part. Fixes one bug from #1333982.
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/compile.c b/Python/compile.c
index a883f5f..93cfb64 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -2359,8 +2359,9 @@ compiler_import(struct compiler *c, stmt_ty s)
ADDOP_NAME(c, IMPORT_NAME, alias->name, names);
if (alias->asname) {
- return compiler_import_as(c,
- alias->name, alias->asname);
+ r = compiler_import_as(c, alias->name, alias->asname);
+ if (!r)
+ return r;
}
else {
identifier tmp = alias->name;