Skip to content

Commit

Permalink
fix: readme and core-sdk before summer
Browse files Browse the repository at this point in the history
Signed-off-by: zFernand0 <[email protected]>
  • Loading branch information
zFernand0 committed May 20, 2024
1 parent d388ac4 commit bb4633c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
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 location(self, dirname: str) -> None:
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 @@ def init_from_file(
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

0 comments on commit bb4633c

Please sign in to comment.