summaryrefslogtreecommitdiff
path: root/Python/compile.c
diff options
context:
space:
mode:
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>2005-10-23 03:45:42 +0000
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>2005-10-23 03:45:42 +0000
commitac699efad8ec4967db47d719df29b2f30cc5ee54 (patch)
tree659d722e6bd0e7f42c568eab9fbd4ce36f82fa8b /Python/compile.c
parent147b75931df421b9531cadadd3e182bae542c137 (diff)
downloadcpython-git-ac699efad8ec4967db47d719df29b2f30cc5ee54.tar.gz
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 a883f5f7c3..93cfb641e0 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;