diff options
Diffstat (limited to 'Modules/faulthandler.c')
-rw-r--r-- | Modules/faulthandler.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c index 172945d..47bc9e8 100644 --- a/Modules/faulthandler.c +++ b/Modules/faulthandler.c @@ -1048,8 +1048,11 @@ faulthandler_env_options(void) { PyObject *xoptions, *key, *module, *res; _Py_IDENTIFIER(enable); + char *p; - if (!Py_GETENV("PYTHONFAULTHANDLER")) { + if (!((p = Py_GETENV("PYTHONFAULTHANDLER")) && *p != '\0')) { + /* PYTHONFAULTHANDLER environment variable is missing + or an empty string */ int has_key; xoptions = PySys_GetXOptions(); |