diff --git a/Misc/NEWS b/Misc/NEWS index d035ff10bd6..39e24303604 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -12,6 +12,8 @@ What's New in Python 3.1.3? Core and Builtins ----------------- +- Restore GIL in nis_cat in case of error. + - Issue #5319: Print an error if flushing stdout fails at interpreter shutdown. diff --git a/Modules/nismodule.c b/Modules/nismodule.c index 16c7b813b07..d75af5d589c 100644 --- a/Modules/nismodule.c +++ b/Modules/nismodule.c @@ -124,6 +124,7 @@ nis_foreach (int instatus, char *inkey, int inkeylen, char *inval, PyErr_Clear(); Py_XDECREF(key); Py_XDECREF(val); + indata->state = PyEval_SaveThread(); return 1; } err = PyDict_SetItem(indata->dict, key, val);