Pablo Galindo Salgado <pablog...@gmail.com> added the comment:
Yup. But what is the best way to signal the caller that _PyPathConfig_ComputeArgv0 has failed because _Py_wgetcwd has failed without changing the API massively? Right now if _PyPathConfig_ComputeArgv0 returns null is assumed that is due to a memory error when calling PyUnicode_FromWideChar. So either we stop returning _Py_INIT_NO_MEMORY() and then skip appending to sys_path or we change the API to signal different problems to the caller. Also, notice that the same function is used in sysmodule.c in PySys_SetArgvEx: If argv[0] is not '-c' nor '-m', prepend argv[0] to sys.path. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36236> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com