From 31bb43b52fe591509033f6e38e758ae0ae6f507f Mon Sep 17 00:00:00 2001 From: Thomas Duval Date: Thu, 30 Nov 2017 11:33:57 +0100 Subject: Fix a bug in manager API Change-Id: Iaac09a9d2852cbc45784168240be821bc3eadd6e --- moonv4/moon_manager/moon_manager/api/generic.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'moonv4') diff --git a/moonv4/moon_manager/moon_manager/api/generic.py b/moonv4/moon_manager/moon_manager/api/generic.py index ac4f8f1e..9ff285c8 100644 --- a/moonv4/moon_manager/moon_manager/api/generic.py +++ b/moonv4/moon_manager/moon_manager/api/generic.py @@ -107,18 +107,18 @@ class API(Resource): api_desc = dict() for api_name in api_list: api_desc[api_name] = {} - group_api_obj = eval("moon_interface.api.{}".format(api_name)) + group_api_obj = eval("moon_manager.api.{}".format(api_name)) api_desc[api_name]["description"] = group_api_obj.__doc__ if "__version__" in dir(group_api_obj): api_desc[api_name]["version"] = group_api_obj.__version__ object_list = list(filter(lambda x: "__" not in x, dir(group_api_obj))) - for obj in map(lambda x: eval("moon_interface.api.{}.{}".format(api_name, x)), object_list): + for obj in map(lambda x: eval("moon_manager.api.{}.{}".format(api_name, x)), object_list): if "__urls__" in dir(obj): api_desc[api_name][obj.__name__] = dict() api_desc[api_name][obj.__name__]["urls"] = obj.__urls__ api_desc[api_name][obj.__name__]["methods"] = dict() for _method in filter(lambda x: x in __methods, dir(obj)): - docstring = eval("moon_interface.api.{}.{}.{}.__doc__".format(api_name, obj.__name__, _method)) + docstring = eval("moon_manager.api.{}.{}.{}.__doc__".format(api_name, obj.__name__, _method)) api_desc[api_name][obj.__name__]["methods"][_method] = docstring api_desc[api_name][obj.__name__]["description"] = str(obj.__doc__) if group_id in api_desc: -- cgit 1.2.3-korg