[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56608] trunk/blender/release/scripts/ modules/rna_info.py: fix rna_info, python method to C function wasn' t being tested for.
Campbell Barton
ideasman42 at gmail.com
Thu May 9 04:50:59 CEST 2013
Revision: 56608
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56608
Author: campbellbarton
Date: 2013-05-09 02:50:59 +0000 (Thu, 09 May 2013)
Log Message:
-----------
fix rna_info, python method to C function wasn't being tested for. (broke changelog generator)
Modified Paths:
--------------
trunk/blender/release/scripts/modules/rna_info.py
Modified: trunk/blender/release/scripts/modules/rna_info.py
===================================================================
--- trunk/blender/release/scripts/modules/rna_info.py 2013-05-09 01:58:49 UTC (rev 56607)
+++ trunk/blender/release/scripts/modules/rna_info.py 2013-05-09 02:50:59 UTC (rev 56608)
@@ -148,7 +148,9 @@
import types
functions = []
for identifier, attr in self._get_py_visible_attrs():
- if type(attr) in {types.FunctionType, types.MethodType}:
+ # methods may be python wrappers to C functions
+ attr_func = getattr(attr, "__func__", attr)
+ if type(attr_func) in {types.FunctionType, types.MethodType}:
functions.append((identifier, attr))
return functions
@@ -156,7 +158,9 @@
import types
functions = []
for identifier, attr in self._get_py_visible_attrs():
- if type(attr) in {types.BuiltinMethodType, types.BuiltinFunctionType}:
+ # methods may be python wrappers to C functions
+ attr_func = getattr(attr, "__func__", attr)
+ if type(attr_func) in {types.BuiltinMethodType, types.BuiltinFunctionType}:
functions.append((identifier, attr))
return functions
More information about the Bf-blender-cvs
mailing list