New submission from Brian Jones <bkjo...@gmail.com>: In email.utils.localtime, there's a variable 'offset' that will only exist if time.daylight evaluates to True. If time.daylight evaluates to False, you'll get an UnboundLocalError, because 'offset' is being referenced without being assigned.
The attached patch fixes that issue, adds several tests, and also refactors an existing test containing 4-5 assertions into a test for each assertion. ---------- components: Library (Lib) files: localtime_fix.patch keywords: patch messages: 155535 nosy: Brian.Jones priority: normal severity: normal status: open title: email.utils.localtime throws exception if time.daylight is False versions: Python 3.3 Added file: http://bugs.python.org/file24808/localtime_fix.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14278> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com