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>2013-05-09 06:50:59 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-05-09 06:50:59 +0400
commit279a2a1916d87aea05a67a592c9831c8d335071b (patch)
treee709386991934ebbe80198f4b8e9b2457cd6f48b /release/scripts/modules/rna_info.py
parent8771a9f861a4f62a98ca6d677f8dfa63da069404 (diff)
fix rna_info, python method to C function wasn't being tested for. (broke changelog generator)
Diffstat (limited to 'release/scripts/modules/rna_info.py')
-rw-r--r--release/scripts/modules/rna_info.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py
index 6f4b63fc99a..bf15b472805 100644
--- a/release/scripts/modules/rna_info.py
+++ b/release/scripts/modules/rna_info.py
@@ -148,7 +148,9 @@ class InfoStructRNA:
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 @@ class InfoStructRNA:
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