[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34413] trunk/blender/source/blender/ blenkernel/intern/report.c: fix for bug where python functions were not raising exceptions because reports were not added to the list in background mode .
Campbell Barton
ideasman42 at gmail.com
Thu Jan 20 08:41:25 CET 2011
Revision: 34413
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34413
Author: campbellbarton
Date: 2011-01-20 07:41:25 +0000 (Thu, 20 Jan 2011)
Log Message:
-----------
fix for bug where python functions were not raising exceptions because reports were not added to the list in background mode.
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/report.c
Modified: trunk/blender/source/blender/blenkernel/intern/report.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/report.c 2011-01-20 07:38:00 UTC (rev 34412)
+++ trunk/blender/source/blender/blenkernel/intern/report.c 2011-01-20 07:41:25 UTC (rev 34413)
@@ -96,11 +96,9 @@
Report *report;
int len;
- /* exception, print and return in background, no reason to store a list */
- if(G.background)
- reports= NULL;
-
- if(!reports || ((reports->flag & RPT_PRINT) && (type >= reports->printlevel))) {
+ /* in background mode always print otherwise there are cases the errors wont be displayed,
+ * but still add to the report list since this is used for python exception handling */
+ if(G.background || !reports || ((reports->flag & RPT_PRINT) && (type >= reports->printlevel))) {
printf("%s: %s\n", report_type_str(type), message);
fflush(stdout); /* this ensures the message is printed before a crash */
}
More information about the Bf-blender-cvs
mailing list