From 1112c6e3e6eae3aa10680b2d7b0d653de1a4bc0b Mon Sep 17 00:00:00 2001 From: Moshe Date: Thu, 10 Jan 2019 14:22:43 +0200 Subject: allow use of logical path for resources Issue-ID: VNFSDK-350 Change-Id: I75a95412e4029389b2f1b39236339873a77db24e Signed-off-by: Moshe --- vnftest/core/task.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vnftest/core') diff --git a/vnftest/core/task.py b/vnftest/core/task.py index 065ad7e..41756af 100644 --- a/vnftest/core/task.py +++ b/vnftest/core/task.py @@ -124,7 +124,7 @@ class Task(object): # pragma: no cover task_args = task_args_list[i] try: if task_args_file: - with open(task_args_file) as f: + with utils.load_resource(task_args_file) as f: inputs.update(parse_task_args("task_args_file", f.read())) inputs.update(parse_task_args("task_args", task_args)) except TypeError: @@ -392,7 +392,7 @@ class TaskParser(object): # pragma: no cover LOG.info("\nParsing suite file:%s", self.path) try: - with open(self.path) as stream: + with utils.load_resource(self.path) as stream: cfg = yaml_load(stream) except IOError as ioerror: LOG.error("Open suite file failed", ioerror) -- cgit 1.2.3-korg