New submission from Joseph Armbruster: Trunk revision: 58963
Description: No warning or error is reported it a file pointed to by PYTHONSTARTUP is not readable. Request: To display a warning so that the user may be notified. Note: Errors that may occur in PyRun_SimpleFileExFlags are being cast away, may be worthwhile to report an error for those as well (unless this was avoided for good reason :-) Suggestion: static void RunStartupFile(PyCompilerFlags *cf) { char *startup = Py_GETENV("PYTHONSTARTUP"); if (startup != NULL && startup[0] != '\0') { FILE *fp = fopen(startup, "r"); if (fp != NULL) { (void) PyRun_SimpleFileExFlags(fp, startup, 0, cf); PyErr_Clear(); fclose(fp); } else { fprintf(stderr,"Warning: Could not read startup file %s\n",startup); } } } ---------- components: Interpreter Core messages: 57482 nosy: JosephArmbruster severity: minor status: open title: pythonstartup addition of minor error checking type: behavior versions: Python 2.6 __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1442> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com