From 329e4445434d3a34f2ccd3ccbd48cdbae21dada0 Mon Sep 17 00:00:00 2001 From: morganrol Date: Wed, 10 Feb 2021 10:16:59 +0100 Subject: Consider settings custom exceptions for reporting Issue-ID: TEST-303 Signed-off-by: morganrol Change-Id: Ia94f963cc145f154756e2765e7a8a5883ceb3188 --- src/onaptests/steps/reports_collection.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/onaptests/steps/reports_collection.py b/src/onaptests/steps/reports_collection.py index 4e19012..34b28af 100644 --- a/src/onaptests/steps/reports_collection.py +++ b/src/onaptests/steps/reports_collection.py @@ -4,7 +4,7 @@ from enum import Enum from typing import List from jinja2 import Environment, FileSystemLoader, select_autoescape from onapsdk.configuration import settings - +from onapsdk.exceptions import SettingsError class ReportStepStatus(Enum): """Enum which stores steps execution statuses.""" @@ -63,12 +63,12 @@ class ReportsCollection: usecase = settings.SERVICE_NAME try: details = settings.SERVICE_DETAILS - except (KeyError, AttributeError): + except (KeyError, AttributeError, SettingsError): details = "" try: components = settings.SERVICE_COMPONENTS - except (KeyError, AttributeError): + except (KeyError, AttributeError, SettingsError): components = "" jinja_env = Environment( -- cgit 1.2.3-korg