Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-11-01 10:22:19 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-11-01 10:22:19 +0300
commit4012c6e86fe4d7d926804f7d1c8a09dc9673db02 (patch)
tree1278cca2901afbfefb90498fda12c89900cb2741 /source/blender/python/intern/bpy_interface.c
parentf4d6823fd6bfa4721958f014bbbc4178c64f34d8 (diff)
parent276d19f63b4534545c2e1a9d5c48525298b1a445 (diff)
Merge branch 'blender-v2.91-release'
Diffstat (limited to 'source/blender/python/intern/bpy_interface.c')
-rw-r--r--source/blender/python/intern/bpy_interface.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index bff8f0582c4..d343b4fff10 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -360,17 +360,19 @@ void BPY_python_start(bContext *C, int argc, const char **argv)
/* Setting the program name is important so the 'multiprocessing' module
* can launch new Python instances. */
{
+ const char *sys_variable = "executable";
char program_path[FILE_MAX];
if (BKE_appdir_program_python_search(
program_path, sizeof(program_path), PY_MAJOR_VERSION, PY_MINOR_VERSION)) {
PyObject *py_program_path = PyC_UnicodeFromByte(program_path);
- PySys_SetObject("executable", py_program_path);
+ PySys_SetObject(sys_variable, py_program_path);
Py_DECREF(py_program_path);
}
else {
fprintf(stderr,
"Unable to find the python binary, "
"the multiprocessing module may not be functional!\n");
+ PySys_SetObject(sys_variable, Py_None);
}
}