From 36382beb8ce2874743f76268f911c7c919758fb9 Mon Sep 17 00:00:00 2001 From: samadpls Date: Fri, 15 Sep 2023 18:22:51 +0500 Subject: [PATCH] Fixed exception handling in session.py Signed-off-by: samadpls --- src/core/zowe/core_for_zowe_sdk/session.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/zowe/core_for_zowe_sdk/session.py b/src/core/zowe/core_for_zowe_sdk/session.py index 5d5cc6cb..5b85f652 100644 --- a/src/core/zowe/core_for_zowe_sdk/session.py +++ b/src/core/zowe/core_for_zowe_sdk/session.py @@ -45,7 +45,7 @@ def __init__(self, props: dict) -> None: if props.get("host") is not None: self.session: ISession = ISession(host=props.get("host")) else: - raise "Host must be supplied" + raise Exception("Host must be supplied") # determine authentication type if props.get("user") is not None and props.get("password") is not None: @@ -61,7 +61,7 @@ def __init__(self, props: dict) -> None: self.session.tokenValue = props.get("tokenValue") self.session.type = session_constants.AUTH_TYPE_BEARER else: - raise "An authentication method must be supplied" + raise Exception("An authentication method must be supplied") # set additional parameters self.session.basePath = props.get("basePath")