From 279a2a1916d87aea05a67a592c9831c8d335071b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 9 May 2013 02:50:59 +0000 Subject: [PATCH] fix rna_info, python method to C function wasn't being tested for. (broke changelog generator) --- release/scripts/modules/rna_info.py | 8 ++++++-- 1 file 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