summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/Modules/main.c b/Modules/main.c
index ee4a1b8..df4c6d8 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -132,6 +132,16 @@ static void RunStartupFile(PyCompilerFlags *cf)
(void) PyRun_SimpleFileExFlags(fp, startup, 0, cf);
PyErr_Clear();
fclose(fp);
+ } else {
+ int save_errno;
+
+ save_errno = errno;
+ PySys_WriteStderr("Could not open PYTHONSTARTUP\n");
+ errno = save_errno;
+ PyErr_SetFromErrnoWithFilename(PyExc_IOError,
+ startup);
+ PyErr_Print();
+ PyErr_Clear();
}
}
}