]> granicus.if.org Git - python/commitdiff
Issue #27301: Fixed incorrect return code for error in compile.c.
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 15 Jun 2016 17:06:29 +0000 (20:06 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Wed, 15 Jun 2016 17:06:29 +0000 (20:06 +0300)
Python/compile.c

index 51f2874b9472f3301087f6d5b45b867a79b930f8..ba93fb4bdc73e8e8f0e21022bb962b6692162248 100644 (file)
@@ -1889,7 +1889,7 @@ compiler_import_as(struct compiler *c, identifier name, identifier asname)
             attr = PyString_FromStringAndSize(src,
                                 dot ? dot - src : strlen(src));
             if (!attr)
-                return -1;
+                return 0;
             ADDOP_O(c, LOAD_ATTR, attr, names);
             Py_DECREF(attr);
             src = dot + 1;