bpo-37649: Fix exec_prefix check (GH-14897)

(cherry picked from commit 09090d04ef)

Co-authored-by: Orivej Desh <orivej@gmx.fr>
This commit is contained in:
Miss Islington (bot) 2019-09-09 10:59:18 -07:00 committed by GitHub
parent 421ef39968
commit e832963145
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1142,7 +1142,7 @@ calculate_init(PyCalculatePath *calculate,
return DECODE_LOCALE_ERR("PREFIX define", len);
}
calculate->exec_prefix = Py_DecodeLocale(EXEC_PREFIX, &len);
if (!calculate->prefix) {
if (!calculate->exec_prefix) {
return DECODE_LOCALE_ERR("EXEC_PREFIX define", len);
}
calculate->lib_python = Py_DecodeLocale("lib/python" VERSION, &len);