mirror of
https://github.com/python/cpython.git
synced 2025-09-05 00:11:10 +00:00
Don't stop generating code for import statements after the first "import as"
part. Fixes one bug from #1333982.
This commit is contained in:
parent
147b75931d
commit
ac699efad8
1 changed files with 3 additions and 2 deletions
|
@ -2359,8 +2359,9 @@ compiler_import(struct compiler *c, stmt_ty s)
|
||||||
ADDOP_NAME(c, IMPORT_NAME, alias->name, names);
|
ADDOP_NAME(c, IMPORT_NAME, alias->name, names);
|
||||||
|
|
||||||
if (alias->asname) {
|
if (alias->asname) {
|
||||||
return compiler_import_as(c,
|
r = compiler_import_as(c, alias->name, alias->asname);
|
||||||
alias->name, alias->asname);
|
if (!r)
|
||||||
|
return r;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
identifier tmp = alias->name;
|
identifier tmp = alias->name;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue