diff options
author | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2005-10-23 03:45:42 (GMT) |
---|---|---|
committer | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2005-10-23 03:45:42 (GMT) |
commit | ac699efad8ec4967db47d719df29b2f30cc5ee54 (patch) | |
tree | 659d722e6bd0e7f42c568eab9fbd4ce36f82fa8b /Python/compile.c | |
parent | 147b75931df421b9531cadadd3e182bae542c137 (diff) | |
download | cpython-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.c | 5 |
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; |