fix for typo when overwriting pythons stdout/stderr, also print errors if they happen here now.

This commit is contained in:
Campbell Barton 2012-12-04 11:21:33 +00:00
parent 46227675f3
commit 60cd5ee412

@ -276,7 +276,11 @@ void BPY_python_start(int argc, const char **argv)
"sys.__stdout__ = sys.stdout = io.TextIOWrapper(io.open(sys.stdout.fileno(), 'wb', -1), "
"encoding='utf-8', errors='surrogateescape', newline='\\n', line_buffering=True)\n"
"sys.__stderr__ = sys.stderr = io.TextIOWrapper(io.open(sys.stderr.fileno(), 'wb', -1), "
"ncoding='utf-8', errors='surrogateescape', newline='\\n', line_buffering=True)\n");
"encoding='utf-8', errors='surrogateescape', newline='\\n', line_buffering=True)\n");
if (PyErr_Occurred()) {
PyErr_Print();
PyErr_Clear();
}
#endif
/* end the baddness */