]> granicus.if.org Git - python/commitdiff
Fixed a typo in time_localtime()
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>
Tue, 12 Jun 2012 20:14:17 +0000 (16:14 -0400)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>
Tue, 12 Jun 2012 20:14:17 +0000 (16:14 -0400)
Modules/timemodule.c

index 5961ac9e49209eb4a9e6457eec20d850619eea49..a80cb4b82f0a499ba7ab51da831e21a3fb2f02eb 100644 (file)
@@ -401,7 +401,7 @@ time_localtime(PyObject *self, PyObject *args)
 
     if (!parse_time_t_args(args, "|O:localtime", &when))
         return NULL;
-    if (pylocaltime(&when, &buf) == 1)
+    if (pylocaltime(&when, &buf) == -1)
         return NULL;
     return tmtotuple(&buf);
 }