From ef798eee7e223b908361c7c79278cd347128a039 Mon Sep 17 00:00:00 2001 From: Linda Wang Date: Tue, 13 Feb 2018 03:17:49 +0000 Subject: Read env vars instead of using CONST in API Also, improve the way of getting env values. JIRA: FUNCTEST-933 Change-Id: Ia66bbaf683df03c2874fafe578b84bb78a4f3fd1 Signed-off-by: Linda Wang --- functest/api/resources/v1/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'functest/api/resources/v1/tasks.py') diff --git a/functest/api/resources/v1/tasks.py b/functest/api/resources/v1/tasks.py index 6bf625a8..5af8a678 100644 --- a/functest/api/resources/v1/tasks.py +++ b/functest/api/resources/v1/tasks.py @@ -85,7 +85,7 @@ class V1TaskLog(ApiResource): except ValueError: return api_utils.result_handler(status=1, data='No such task id') - task_log_dir = CONST.__getattribute__('dir_results') + task_log_dir = getattr(CONST, 'dir_results') # pylint: disable=maybe-no-member index = int(self._get_args().get('index', 0)) -- cgit 1.2.3-korg