[issue21731] Calendar Problem with Windows (XP)

R. David Murray report at bugs.python.org
Thu Jun 12 15:14:49 CEST 2014


R. David Murray added the comment:

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?

----------
nosy: +r.david.murray

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21731>
_______________________________________


More information about the Python-bugs-list mailing list