Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-03-03 22:10:25 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-03-03 22:36:13 +0300
commitb0bd39c12ad3b1e0770f56010317eb20d1c19535 (patch)
tree84f17c7427fc49f97cf59dead14a63207cb1f382 /source/blender/python/intern/bpy_library_write.c
parentd377f1445a0f30181cb5a39be0da6be3461ed3e2 (diff)
Use IOError exception failing to write blend file
Diffstat (limited to 'source/blender/python/intern/bpy_library_write.c')
-rw-r--r--source/blender/python/intern/bpy_library_write.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_library_write.c b/source/blender/python/intern/bpy_library_write.c
index 255bb82ea10..478e5f78295 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;
}