Issue #18408: Fix time.tzset(), detect exception when calling PyInit_timezone()
This commit is contained in:
parent
9a146eeadb
commit
2ff51b83b8
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue