diff Python/compile.c @ 35772:f64fb284ed15 legacy-trunk

Don't stop generating code for import statements after the first "import as" part. Fixes one bug from #1333982.
author Neil Schemenauer <nascheme@enme.ucalgary.ca>
date Sun, 23 Oct 2005 03:45:42 +0000
parents 7ee6880cb16f
children 0aef351223da
line wrap: on
line diff
--- a/Python/compile.c	Sun Oct 23 03:38:19 2005 +0000
+++ b/Python/compile.c	Sun Oct 23 03:45:42 2005 +0000
@@ -2359,8 +2359,9 @@
 		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;