summaryrefslogtreecommitdiffstats
path: root/catalog-be/src
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-be/src')
-rw-r--r--catalog-be/src/main/resources/scripts/sdcBePy/common/normative/toscaTypes.py4
-rw-r--r--catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/node_type_client.py1
2 files changed, 3 insertions, 2 deletions
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/common/normative/toscaTypes.py b/catalog-be/src/main/resources/scripts/sdcBePy/common/normative/toscaTypes.py
index 9d37c2ad29..fecc88a320 100644
--- a/catalog-be/src/main/resources/scripts/sdcBePy/common/normative/toscaTypes.py
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/common/normative/toscaTypes.py
@@ -1,6 +1,6 @@
import json
import zipfile
-
+import os
import pycurl
from sdcBePy.common.errors import ResourceCreationError
@@ -48,6 +48,8 @@ def _create_normatives_type(file_dir, sdc_be_proxy, types, update_version):
results = []
response_codes = _get_response_code()
for normative_type in types:
+ if not os.path.exists(file_dir):
+ break
result = _send_request(sdc_be_proxy, file_dir, normative_type, update_version)
results.append(result)
if result[1] is None or result[1] not in response_codes:
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/node_type_client.py b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/node_type_client.py
index 7937002567..d241288dcc 100644
--- a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/node_type_client.py
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/node_type_client.py
@@ -71,5 +71,4 @@ class NodeTypeClient:
error_msg = "Failed to import node types '{}'".format(node_type_yaml_path)
logger.log(error_msg, response_buffer.getvalue())
raise Exception(error_msg)
- logger.log("Failed to import node types '{}'".format(node_type_yaml_path))