Message220347
| 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:49 | r.david.murray | set | recipients:
+ r.david.murray, Juebo |
| 2014年06月12日 13:14:49 | r.david.murray | set | messageid: <1402578889.9.0.330749833016.issue21731@psf.upfronthosting.co.za> |
| 2014年06月12日 13:14:49 | r.david.murray | link | issue21731 messages |
| 2014年06月12日 13:14:49 | r.david.murray | create |
|