diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-05-09 06:50:59 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-05-09 06:50:59 +0400 |
commit | 279a2a1916d87aea05a67a592c9831c8d335071b (patch) | |
tree | e709386991934ebbe80198f4b8e9b2457cd6f48b | |
parent | 8771a9f861a4f62a98ca6d677f8dfa63da069404 (diff) |
fix rna_info, python method to C function wasn't being tested for. (broke changelog generator)
-rw-r--r-- | release/scripts/modules/rna_info.py | 8 |
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 |