Files
cpython/Python
Thomas Wouters 1e42ab6e43 Backport trunk revision 53527:
SF patch #1630975: Fix crash when replacing sys.stdout in sitecustomize

When running the interpreter in an environment that would cause it to set
stdout/stderr/stdin's encoding, having a sitecustomize that would replace
them with something other than PyFile objects would crash the interpreter.
Fix it by simply ignoring the encoding-setting for non-files.

This could do with a test, but I can think of no maintainable and portable
way to test this bug, short of adding a sitecustomize.py to the buildsystem
and have it always run with it (hmmm....)
2007-01-23 15:09:19 +00:00
..
2006-10-05 19:01:50 +00:00
2006-11-29 22:07:38 +00:00
2002-06-11 06:22:31 +00:00
2002-01-23 15:51:12 +00:00
2005-11-09 07:02:40 +00:00
2002-08-15 14:59:02 +00:00
2006-04-25 15:33:48 +00:00
2006-10-05 18:08:58 +00:00
2002-12-30 22:08:05 +00:00
2006-03-01 21:36:32 +00:00
2006-10-05 18:08:58 +00:00
2007-01-23 15:09:19 +00:00
2007-01-23 15:09:19 +00:00
2002-06-11 06:22:31 +00:00
2005-03-28 12:36:19 +00:00
2005-07-09 15:27:05 +00:00
2005-09-14 17:54:39 +00:00