From 98c69958a5f463ebaa5b75ef3188d599ead93692 Mon Sep 17 00:00:00 2001 From: "k.kedron" Date: Mon, 23 Mar 2020 12:01:38 +0100 Subject: Fixed import in sdc-BE-init python scripts Issue-ID: SDC-2784 Signed-off-by: Krystian Kedron Change-Id: I72eb129c5c4cb63fdf0ab13a6128d555b49b6d0c --- .../resources/scripts/import/tosca/upgradeHeatAndNormativeTypes.py | 4 +--- catalog-be/src/main/resources/scripts/import/tosca/upgradeNfvTypes.py | 4 +--- .../src/main/resources/scripts/import/tosca/upgradeONAPTypes.py | 4 +--- catalog-be/src/main/resources/scripts/import/tosca/upgradeSolTypes.py | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-) (limited to 'catalog-be/src/main/resources/scripts') diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeHeatAndNormativeTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeHeatAndNormativeTypes.py index 4bf1de37f1..7ba925038f 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeHeatAndNormativeTypes.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/upgradeHeatAndNormativeTypes.py @@ -1,5 +1,3 @@ -import yaml - from importNormativeTypes import * @@ -45,7 +43,7 @@ def upgradeTypesPerConfigFile(scheme, be_host, be_port, admin_user, base_dir, up if result[1] is None or result[1] not in response_codes: print "Failed creating normative type " + normativeType + ". " + str(result[1]) return results - except yaml.YAMLError as exc: + except Exception as exc: print(exc) diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNfvTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeNfvTypes.py index 81ee843893..ce939878ae 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNfvTypes.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/upgradeNfvTypes.py @@ -1,5 +1,3 @@ -import yaml - from importNormativeTypes import * @@ -35,7 +33,7 @@ def upgradeNfvTypesPerConfigFile(scheme, be_host, be_port, admin_user, base_dir, results.append(result) if result[1] is None or result[1] not in response_codes: print "Failed creating nfv type " + nfvType + ". " + str(result[1]) - except yaml.YAMLError as exc: + except Exception as exc: print(exc) return results diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPTypes.py index 2074ba9c27..bb26659621 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPTypes.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPTypes.py @@ -1,5 +1,3 @@ -import yaml - from importNormativeTypes import * @@ -35,7 +33,7 @@ def upgradeOnapTypesPerConfigFile(scheme, be_host, be_port, admin_user, base_dir results.append(result) if result[1] is None or result[1] not in response_codes: print "Failed creating onap type " + onap_type + ". " + str(result[1]) - except yaml.YAMLError as exc: + except Exception as exc: print(exc) return results diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeSolTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeSolTypes.py index e9cebfe9a8..aa60e4d49d 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeSolTypes.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/upgradeSolTypes.py @@ -1,5 +1,3 @@ -import yaml - from importNormativeTypes import * @@ -34,7 +32,7 @@ def upgradeSolTypesPerConfigFile(scheme, be_host, be_port, admin_user, base_dir, results.append(result) if result[1] is None or result[1] not in response_codes: print "Failed creating sol type " + solType + ". " + str(result[1]) - except yaml.YAMLError as exc: + except Exception as exc: print(exc) return results -- cgit 1.2.3-korg