changeset 84690:4d3bb9763bf9

Issue #18408: Fix time.tzset(), detect exception when calling PyInit_timezone()
author Victor Stinner <victor.stinner@gmail.com>
date Wed, 17 Jul 2013 21:42:45 +0200
parents 7b81a535ad14
children 563b27bef79f
files Modules/timemodule.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Modules/timemodule.c	Wed Jul 17 13:41:39 2013 +0200
+++ b/Modules/timemodule.c	Wed Jul 17 21:42:45 2013 +0200
@@ -851,6 +851,8 @@
     /* Reset timezone, altzone, daylight and tzname */
     PyInit_timezone(m);
     Py_DECREF(m);
+    if (PyErr_Occurred())
+        return NULL;
 
     Py_INCREF(Py_None);
     return Py_None;