Code Review
/
modeling
/
etsicatalog.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
update genericparser code
[modeling/etsicatalog.git]
/
genericparser
/
packages
/
biz
/
vnf_pkg_artifacts.py
diff --git
a/genericparser/packages/biz/vnf_pkg_artifacts.py
b/genericparser/packages/biz/vnf_pkg_artifacts.py
index
f2506da
..
3a54f02
100644
(file)
--- a/
genericparser/packages/biz/vnf_pkg_artifacts.py
+++ b/
genericparser/packages/biz/vnf_pkg_artifacts.py
@@
-36,5
+36,8
@@
class FetchVnfPkgArtifact(object):
artifact_path = fileutil.get_artifact_path(vnf_extract_path, artifactPath)
if not artifact_path:
raise ArtifactNotFoundException("Couldn't artifact %s" % artifactPath)
artifact_path = fileutil.get_artifact_path(vnf_extract_path, artifactPath)
if not artifact_path:
raise ArtifactNotFoundException("Couldn't artifact %s" % artifactPath)
- file_content = open(artifact_path, 'rb').read()
+ with open(artifact_path, 'rb') as f:
+ file_content = f.read()
+ else:
+ raise ArtifactNotFoundException("NF Package format is not csar or zip")
return file_content
return file_content