Kaydet (Commit) 2ff51b83 authored tarafından Victor Stinner's avatar Victor Stinner

Issue #18408: Fix time.tzset(), detect exception when calling PyInit_timezone()

üst 9a146eea
...@@ -851,6 +851,8 @@ time_tzset(PyObject *self, PyObject *unused) ...@@ -851,6 +851,8 @@ time_tzset(PyObject *self, PyObject *unused)
/* Reset timezone, altzone, daylight and tzname */ /* Reset timezone, altzone, daylight and tzname */
PyInit_timezone(m); PyInit_timezone(m);
Py_DECREF(m); Py_DECREF(m);
if (PyErr_Occurred())
return NULL;
Py_INCREF(Py_None); Py_INCREF(Py_None);
return Py_None; return Py_None;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment