Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed exception handling in session.py #217

Merged
merged 3 commits into from
Sep 21, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/core/zowe/core_for_zowe_sdk/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
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")

Check warning on line 48 in src/core/zowe/core_for_zowe_sdk/session.py

View check run for this annotation

Codecov / codecov/patch

src/core/zowe/core_for_zowe_sdk/session.py#L48

Added line #L48 was not covered by tests

# determine authentication type
if props.get("user") is not None and props.get("password") is not None:
Expand All @@ -61,7 +61,7 @@
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")

Check warning on line 64 in src/core/zowe/core_for_zowe_sdk/session.py

View check run for this annotation

Codecov / codecov/patch

src/core/zowe/core_for_zowe_sdk/session.py#L64

Added line #L64 was not covered by tests

# set additional parameters
self.session.basePath = props.get("basePath")
Expand Down
Loading