Issue 10077: Python 3.1: site error is not logged (original) (raw)

If the site module fails, the error is not logged because of a bug in initsite(). The problem is that PyFile_WriteString() does nothing if an error occurred.

In verbose mode, only the exception is logged, without the first line:

'import site' failed; traceback:

Attached patch fixes both issues.

--

This issue is specific to Python 3.1: