You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
localtime_fix.patch: patch fixing localtime throwing UnboundLocalError when time.daylight is false.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/bitdancer'closed_at=<Date2012-03-15.06:11:53.769>created_at=<Date2012-03-13.00:14:00.921>labels= ['type-bug', 'library']
title='email.utils.localtime throws exception if time.daylight is False'updated_at=<Date2012-03-15.06:11:53.767>user='https://bugs.python.org/BrianJones'
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.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: