]> granicus.if.org Git - python/commitdiff
#665194: fix variable name in exception code path.
authorR David Murray <rdmurray@bitdance.com>
Thu, 23 Aug 2012 01:52:31 +0000 (21:52 -0400)
committerR David Murray <rdmurray@bitdance.com>
Thu, 23 Aug 2012 01:52:31 +0000 (21:52 -0400)
It was correct in the original patch and I foobared it
when I restructured part of the code.

Lib/email/utils.py

index c6204da27521f400c5a71edc20a8cf14b88de040..f32cdd931486d0fd8c612027603c11f3d9bd7f20 100644 (file)
@@ -401,7 +401,7 @@ def localtime(dt=None, isdst=-1):
     except AttributeError:
         # Compute UTC offset and compare with the value implied by tm_isdst.
         # If the values match, use the zone name implied by tm_isdst.
-        delta = dt - datetime.datetime(*time.gmtime(ts)[:6])
+        delta = dt - datetime.datetime(*time.gmtime(seconds)[:6])
         dst = time.daylight and localtm.tm_isdst > 0
         gmtoff = -(time.altzone if dst else time.timezone)
         if delta == datetime.timedelta(seconds=gmtoff):