From ac699efad8ec4967db47d719df29b2f30cc5ee54 Mon Sep 17 00:00:00 2001 From: Neil Schemenauer Date: Sun, 23 Oct 2005 03:45:42 +0000 Subject: [PATCH] Don't stop generating code for import statements after the first "import as" part. Fixes one bug from #1333982. --- Python/compile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Python/compile.c b/Python/compile.c index a883f5f7c38..93cfb641e0d 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;