From 5d843972856e4c0452a4ec37cbe665a3636352d5 Mon Sep 17 00:00:00 2001 From: josephthaliath Date: Tue, 25 Apr 2023 12:06:19 +0530 Subject: [PATCH] Change to add exception instead of logging error Issue-Id: AIMLFW-40 Change-Id: Ia7fcceb2d86c23901086fc638958e6ec252e6be2 Signed-off-by: josephthaliath --- trainingmgr/common/trainingmgr_operations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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, -- 2.16.6