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

fix: readme and core-sdk before summer #263

Closed
wants to merge 1 commit into from
Closed
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Create a dictionary to handle communication with the plug-in:
Alternatively, you can use an existing Zowe CLI profile instead:

```python
from zowe.zos_core_for_zowe_sdk import ProfileManager
from zowe.core_for_zowe_sdk import ProfileManager
from zowe.zos_console_for_zowe_sdk import Console

profile = ProfileManager().load(profile_type="zosmf")
Expand Down
4 changes: 3 additions & 1 deletion src/core/zowe/core_for_zowe_sdk/config_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
def init_from_file(
self,
validate_schema: Optional[bool] = True,
suppress_config_file_warnings: Optional[bool] = True,
) -> None:
"""
Initializes the class variable after
Expand All @@ -118,7 +119,8 @@
pass

if self.filepath is None or not os.path.isfile(self.filepath):
warnings.warn(f"Config file does not exist at {self.filepath}")
if not suppress_config_file_warnings:
warnings.warn(f"Config file does not exist at {self.filepath}")

Check warning on line 123 in src/core/zowe/core_for_zowe_sdk/config_file.py

View check run for this annotation

Codecov / codecov/patch

src/core/zowe/core_for_zowe_sdk/config_file.py#L123

Added line #L123 was not covered by tests
return

with open(self.filepath, encoding="UTF-8", mode="r") as fileobj:
Expand Down
3 changes: 2 additions & 1 deletion src/core/zowe/core_for_zowe_sdk/profile_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ def load(
check_missing_props: bool = True,
validate_schema: Optional[bool] = True,
override_with_env: Optional[bool] = False,
suppress_config_file_warnings: Optional[bool] = True,
) -> dict:
"""Load connection details from a team config profile.
Returns
Expand Down Expand Up @@ -258,7 +259,7 @@ def load(
for cfg_layer in (self.project_user_config, self.project_config, self.global_user_config, self.global_config):
if cfg_layer.profiles is None:
try:
cfg_layer.init_from_file(validate_schema)
cfg_layer.init_from_file(validate_schema, suppress_config_file_warnings)
except SecureProfileLoadFailed:
warnings.warn(
f"Could not load secure properties for {cfg_layer.filepath}",
Expand Down
Loading