Author r.david.murray
Recipients Juebo, r.david.murray
Date 2014-06-12.13:14:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1402578889.9.0.330749833016.issue21731@psf.upfronthosting.co.za>
In-reply-to
Content
The code is mostly correct as it exists in the calendar module.  You are running into issue 10466.  Per my comment in that issue, it may be possible to put a workaround into the calendar module, but your suggestion isn't it, since your code would leave the locale modified, not restored to its value before the calendar function was called.

What happens if you replace the original setlocale call in __enter__ with a try/except, and if the set fails, redo the set call using ''?  Does the save of oldlocale and its restore work in that case?
History
Date User Action Args
2014-06-12 13:14:49r.david.murraysetrecipients: + r.david.murray, Juebo
2014-06-12 13:14:49r.david.murraysetmessageid: <1402578889.9.0.330749833016.issue21731@psf.upfronthosting.co.za>
2014-06-12 13:14:49r.david.murraylinkissue21731 messages
2014-06-12 13:14:49r.david.murraycreate