fix for bug where python functions were not raising exceptions because reports were not added to the list in background mode.
This commit is contained in:
parent
287efe6036
commit
ac058624ae
@ -96,11 +96,9 @@ void BKE_report(ReportList *reports, ReportType type, const char *message)
|
|||||||
Report *report;
|
Report *report;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
/* exception, print and return in background, no reason to store a list */
|
/* in background mode always print otherwise there are cases the errors wont be displayed,
|
||||||
if(G.background)
|
* but still add to the report list since this is used for python exception handling */
|
||||||
reports= NULL;
|
if(G.background || !reports || ((reports->flag & RPT_PRINT) && (type >= reports->printlevel))) {
|
||||||
|
|
||||||
if(!reports || ((reports->flag & RPT_PRINT) && (type >= reports->printlevel))) {
|
|
||||||
printf("%s: %s\n", report_type_str(type), message);
|
printf("%s: %s\n", report_type_str(type), message);
|
||||||
fflush(stdout); /* this ensures the message is printed before a crash */
|
fflush(stdout); /* this ensures the message is printed before a crash */
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user