Hello,

currently, the bootloader tries to execute all the scripts registered in the
executable, and continue execution through them even if one fails. I don't
believe this is safe. Typically, there is one user script which is the
program, and some other scripts which are from PyInstaller: the import
manager and the runtime hooks.  If either of them fail execution, it's
useless to get on executing the program as something would probably fail.
This also simplifies debugging of PyInstaller itself.

Committed as r243.
-- 
Giovanni Bajo
Index: source/common/launch.c
===================================================================
--- source/common/launch.c      (revision 242)
+++ source/common/launch.c      (working copy)
@@ -865,17 +865,18 @@
                        data = extract(ptoc);
                        /* Run it */
                        rc = PyRun_SimpleString(data);
-                       /* log errors and go on */
+                       /* log errors and abort */
                        if (rc != 0) {
                                sprintf(msg, " RC: %d from %s\n", rc, 
ptoc->name);
                                VS(msg);
+                               return rc;
                        }
                        free(data);
                }
 
                ptoc = incrementTocPtr(ptoc); 
        }
-       return rc;
+       return 0;
 }
 
 /* 
_______________________________________________
PyInstaller mailing list
[email protected]
http://lists.hpcf.upr.edu/mailman/listinfo/pyinstaller

Reply via email to