From: josephthaliath Date: Tue, 25 Apr 2023 06:36:19 +0000 (+0530) Subject: Change to add exception instead of logging error X-Git-Tag: 1.1.0~20 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F73%2F10973%2F1;p=aiml-fw%2Fawmf%2Ftm.git Change to add exception instead of logging error Issue-Id: AIMLFW-40 Change-Id: Ia7fcceb2d86c23901086fc638958e6ec252e6be2 Signed-off-by: josephthaliath --- diff --git a/trainingmgr/common/trainingmgr_operations.py b/trainingmgr/common/trainingmgr_operations.py index cece95c..110f197 100644 --- a/trainingmgr/common/trainingmgr_operations.py +++ b/trainingmgr/common/trainingmgr_operations.py @@ -24,6 +24,7 @@ Training manager main operations import json import requests import validators +from trainingmgr.common.exceptions_utls import TMException def create_url_host_port(protocol, host, port, path=''): """ @@ -31,8 +32,7 @@ def create_url_host_port(protocol, host, port, path=''): """ url = protocol + '://' + host + ':' + port + '/' + path if not validators.url(url): - logger.debug('URL validation error: ',url) - return None + raise TMException('URL validation error: '+ url) return url def data_extraction_start(training_config_obj, trainingjob_name, feature_list, query_filter,