summaryrefslogtreecommitdiffstats
path: root/vnftest/core
diff options
context:
space:
mode:
authorMoshe <moshehoa@amdocs.com>2019-01-10 14:22:43 +0200
committerMoshe <moshehoa@amdocs.com>2019-01-10 14:22:50 +0200
commit1112c6e3e6eae3aa10680b2d7b0d653de1a4bc0b (patch)
treebca2c48047f1d525934324f2adb9d4920194b908 /vnftest/core
parentce6df7403af5694aee412836cd3c86e33307e190 (diff)
allow use of logical path for resources
Issue-ID: VNFSDK-350 Change-Id: I75a95412e4029389b2f1b39236339873a77db24e Signed-off-by: Moshe <moshehoa@amdocs.com>
Diffstat (limited to 'vnftest/core')
-rw-r--r--vnftest/core/task.py4
1 files changed, 2 insertions, 2 deletions
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)