From: Tim Peters <tim.peters@gmail.com> Date: Thu, 23 Jan 2003 17:20:36 +0000 (+0000) Subject: fromutc(): Repair incorrect failure return, as noted by NealN. Thanks! X-Git-Tag: v2.3c1~2359 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b1049e8eca13f6e2634a8eba119f7c5ce5a6b1aa;p=python fromutc(): Repair incorrect failure return, as noted by NealN. Thanks! --- diff --git a/Modules/datetimemodule.c b/Modules/datetimemodule.c index 6f729291c8..f615f6851b 100644 --- a/Modules/datetimemodule.c +++ b/Modules/datetimemodule.c @@ -2794,7 +2794,7 @@ tzinfo_fromutc(PyDateTime_TZInfo *self, PyDateTime_DateTime *dt) mm += delta; if ((mm < 0 || mm >= 60) && normalize_datetime(&y, &m, &d, &hh, &mm, &ss, &us) < 0) - goto Fail; + return NULL; result = new_datetime(y, m, d, hh, mm, ss, us, dt->tzinfo); if (result == NULL) return result;