Message100474
Patch for pythonrun.c:
- catch _PyUnicode_AsString() error in get_codeset(): very unlikely, codeset is the result of nl_langinfo() and is ASCII only
- catch _PyUnicode_AsString(sys.stdin.encoding) error in PyRun_InteractiveOneFlags()
- use _PyUnicode_AsStringOrDefault() for ps1 and ps2: use ps1="" and/or ps2="" on unicode error. I don't know if it's the best option. Display the error is maybe a better idea.
It's possible to raise to test the error on sys.stdin.encoding by adding the following lines to site.py:
class Stdin: pass
sys.stdin = Stdin()
sys.stdin = "\xdc80"
See also #8070: PyRun_InteractiveLoopFlags() doesn't handle errors :-/ |
|
Date |
User |
Action |
Args |
2010-03-05 12:56:17 | vstinner | set | recipients:
+ vstinner, lemburg, loewis, amaury.forgeotdarc, ezio.melotti, Arfrever |
2010-03-05 12:56:17 | vstinner | set | messageid: <1267793777.34.0.337116244426.issue6697@psf.upfronthosting.co.za> |
2010-03-05 12:56:16 | vstinner | link | issue6697 messages |
2010-03-05 12:56:15 | vstinner | create | |
|