]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Don't stop generating code for import statements after the first "import as"
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>
Sun, 23 Oct 2005 03:45:42 +0000 (03:45 +0000)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>
Sun, 23 Oct 2005 03:45:42 +0000 (03:45 +0000)
part.  Fixes one bug from #1333982.

Python/compile.c

index a883f5f7c38e3a9d892e92042fe36018f7ad8e8a..93cfb641e0d033bd566136740ec25eee21a5a388 100644 (file)
@@ -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;