Fix predicate method so it also works on older Python version.
@@ -287,10 +287,14 @@ def generate_providers_table(api):
if name.lower() in IGNORED_PROVIDERS:
continue
+ def is_function_or_method(*args, **kwargs):
+ return (inspect.isfunction(*args, **kwargs) or
+ inspect.ismethod(*args, **kwargs))
+
driver_methods = dict(inspect.getmembers(cls,
- predicate=inspect.ismethod))
+ predicate=is_function_or_method))
base_methods = dict(inspect.getmembers(driver,
- predicate=inspect.ismethod))
+ predicate=is_function_or_method))
base_api_methods = BASE_API_METHODS[api]
result[name] = {'name': cls.name, 'website': cls.website,
@@ -299,6 +303,8 @@ def generate_providers_table(api):
'cls': cls,
'methods': {}}
+ print('Generating tables for provider: %s' % (name))
+
for method_name in base_api_methods:
base_method = base_methods[method_name]
driver_method = driver_methods[method_name]
