[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52765] trunk/blender/source/blender/ python/intern/bpy_interface.c: fix for typo when overwriting pythons stdout /stderr, also print errors if they happen here now.
Campbell Barton
ideasman42 at gmail.com
Tue Dec 4 12:21:35 CET 2012
Revision: 52765
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52765
Author: campbellbarton
Date: 2012-12-04 11:21:33 +0000 (Tue, 04 Dec 2012)
Log Message:
-----------
fix for typo when overwriting pythons stdout/stderr, also print errors if they happen here now.
Modified Paths:
--------------
trunk/blender/source/blender/python/intern/bpy_interface.c
Modified: trunk/blender/source/blender/python/intern/bpy_interface.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_interface.c 2012-12-04 09:45:38 UTC (rev 52764)
+++ trunk/blender/source/blender/python/intern/bpy_interface.c 2012-12-04 11:21:33 UTC (rev 52765)
@@ -276,7 +276,11 @@
"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 */
More information about the Bf-blender-cvs
mailing list