From f5060bc90118c88593fd213728bf58894fa6394c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 12 Apr 2021 21:39:56 +1000 Subject: PyAPI: support retrieving the exception when running a string - Optionally get the error as a single line. - Support access the error as an allocated string. - PyC_ExceptionBuffer_Simple was always printing to the `stdout` while PyC_ExceptionBuffer didn't, now either print to the output. Without this, callers are unable to do anything with the error string. --- source/blender/python/generic/py_capi_utils.c | 1 - 1 file changed, 1 deletion(-) (limited to 'source/blender/python/generic') diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c index 78f5b9ba2cc..9824d5f17c4 100644 --- a/source/blender/python/generic/py_capi_utils.c +++ b/source/blender/python/generic/py_capi_utils.c @@ -733,7 +733,6 @@ PyObject *PyC_ExceptionBuffer_Simple(void) PyErr_Restore(error_type, error_value, error_traceback); - PyErr_Print(); PyErr_Clear(); return string_io_buf; } -- cgit v1.2.3