From: Victor Stinner Date: Wed, 17 Jul 2013 19:42:45 +0000 (+0200) Subject: Issue #18408: Fix time.tzset(), detect exception when calling PyInit_timezone() X-Git-Tag: v3.4.0a1~169 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2ff51b83b88b65818479706f2d5238c52bbae296;p=thirdparty%2FPython%2Fcpython.git Issue #18408: Fix time.tzset(), detect exception when calling PyInit_timezone() --- diff --git a/Modules/timemodule.c b/Modules/timemodule.c index 297467f73092..2c3341cc1a69 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -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;