[Bf-blender-cvs] [b0bd39c] master: Use IOError exception failing to write blend file
Campbell Barton
noreply at git.blender.org
Thu Mar 3 20:43:59 CET 2016
Commit: b0bd39c12ad3b1e0770f56010317eb20d1c19535
Author: Campbell Barton
Date: Fri Mar 4 06:10:25 2016 +1100
Branches: master
https://developer.blender.org/rBb0bd39c12ad3b1e0770f56010317eb20d1c19535
Use IOError exception failing to write blend file
===================================================================
M source/blender/python/intern/bpy_library_write.c
===================================================================
diff --git a/source/blender/python/intern/bpy_library_write.c b/source/blender/python/intern/bpy_library_write.c
index 255bb82..478e5f7 100644
--- a/source/blender/python/intern/bpy_library_write.c
+++ b/source/blender/python/intern/bpy_library_write.c
@@ -54,6 +54,10 @@ PyDoc_STRVAR(bpy_lib_write_doc,
"\n"
" Write data-blocks into a blend file.\n"
"\n"
+" .. note::\n"
+"\n"
+" Indirectly referenced data-blocks will be expanded and written too.\n"
+"\n"
" :arg filepath: The path to write the blend-file.\n"
" :type filepath: string\n"
" :arg datablocks: data-blocks (:class:`bpy.types.ID` instances).\n"
@@ -165,8 +169,8 @@ static PyObject *bpy_lib_write(PyObject *UNUSED(self), PyObject *args, PyObject
Py_INCREF(ret);
}
else {
- if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == 0) {
- PyErr_SetString(PyExc_RuntimeError, "Unknown error writing library data");
+ if (BPy_reports_to_error(&reports, PyExc_IOError, true) == 0) {
+ PyErr_SetString(PyExc_IOError, "Unknown error writing library data");
}
ret = NULL;
}
More information about the Bf-blender-cvs
mailing list