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
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All notable changes to the Zowe Client Python SDK will be documented in this fil
## Recent Changes

- Bugfix: Fixed issue for datasets and jobs with special characters in URL [#211] (https://github.com/zowe/zowe-client-python-sdk/issues/211)

- Bugfix: Fixed exception handling in session.py [#213] (https://github.com/zowe/zowe-client-python-sdk/issues/213)

- Feature: Added a CredentialManager class to securely retrieve values from credentials and manage multiple credential entries on Windows [#134](https://github.com/zowe/zowe-client-python-sdk/issues/134)
- Feature: Added method to load profile properties from environment variables
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