summaryrefslogtreecommitdiffstats
path: root/vnftest/common
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/common
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/common')
-rw-r--r--vnftest/common/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/vnftest/common/utils.py b/vnftest/common/utils.py
index eaf184a..882403f 100644
--- a/vnftest/common/utils.py
+++ b/vnftest/common/utils.py
@@ -471,9 +471,9 @@ def resource_as_string(path):
return resource.read()
-def load_resource(path):
+def load_resource(path, mode="r"):
try:
- return open(path)
+ return open(path, mode)
except Exception:
logger.info("path not loaded as file, trying load as package")
split_path = os.path.split(path)