Commit: 7942057abb2ae673cc294c7278f516c75815f830
Author: Campbell Barton
Date:   Mon Jun 5 15:31:05 2017 +1000
Branches: greasepencil-object
https://developer.blender.org/rB7942057abb2ae673cc294c7278f516c75815f830

PyAPI: correct exception, expect 'staticmethod'

===================================================================

M       source/blender/python/intern/bpy_rna.c

===================================================================

diff --git a/source/blender/python/intern/bpy_rna.c 
b/source/blender/python/intern/bpy_rna.c
index 3a6d5c9f972..977e00f6dd7 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -7322,7 +7322,8 @@ static int bpy_class_validate_recursive(PointerRNA 
*dummyptr, StructRNA *srna, v
                        if (is_staticmethod) {
                                if (PyMethod_Check(item) == 0) {
                                        PyErr_Format(PyExc_TypeError,
-                                                    "expected %.200s, %.200s 
class \"%.200s\" attribute to be a method, not a %.200s",
+                                                    "expected %.200s, %.200s 
class \"%.200s\" "
+                                                    "attribute to be a 
staticmethod, not a %.200s",
                                                     class_type, py_class_name, 
RNA_function_identifier(func), Py_TYPE(item)->tp_name);
                                        return -1;
                                }
@@ -7331,7 +7332,8 @@ static int bpy_class_validate_recursive(PointerRNA 
*dummyptr, StructRNA *srna, v
                        else {
                                if (PyFunction_Check(item) == 0) {
                                        PyErr_Format(PyExc_TypeError,
-                                                    "expected %.200s, %.200s 
class \"%.200s\" attribute to be a function, not a %.200s",
+                                                    "expected %.200s, %.200s 
class \"%.200s\" "
+                                                    "attribute to be a 
function, not a %.200s",
                                                     class_type, py_class_name, 
RNA_function_identifier(func), Py_TYPE(item)->tp_name);
                                        return -1;
                                }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to