mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Issue #18408: Fix time.tzset(), detect exception when calling PyInit_timezone()
This commit is contained in:
parent
9a146eeadb
commit
2ff51b83b8
1 changed files with 2 additions and 0 deletions
|
@ -851,6 +851,8 @@ time_tzset(PyObject *self, PyObject *unused)
|
|||
/* Reset timezone, altzone, daylight and tzname */
|
||||
PyInit_timezone(m);
|
||||
Py_DECREF(m);
|
||||
if (PyErr_Occurred())
|
||||
return NULL;
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue