From 6fccfa7362f4b879c6f0099f92460cd9c28f1d1d Mon Sep 17 00:00:00 2001 From: Olamide Ojo Date: Thu, 31 Oct 2024 23:25:43 +0100 Subject: [PATCH] Update sample scripts provided to users in various readme files Signed-off-by: Olamide Ojo --- CHANGELOG.md | 3 +-- samples/SampleFiles.py | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 688bb6fe..921929aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -145,5 +145,4 @@ All notable changes to the Zowe Client Python SDK will be documented in this fil - Fixed exception handling in session.py [#213](https://github.com/zowe/zowe-client-python-sdk/issues/213) ### Bug Fixes -- Updated the sample scripts in readmes to remove/ stop using methods that were deprecated in #276 -- Therefore this fixes #336 \ No newline at end of file +- Updated the sample scripts in readmes to remove/ stop using methods that were deprecated in #276. [#336](https://github.com/zowe/zowe-client-python-sdk/issues/336) \ No newline at end of file diff --git a/samples/SampleFiles.py b/samples/SampleFiles.py index fa92a6dc..5403b73c 100644 --- a/samples/SampleFiles.py +++ b/samples/SampleFiles.py @@ -9,7 +9,7 @@ # ----------------------------------------------------- print("...SYS1 datasets\n") my_files = Files(connection) -my_dsn_list = my_files.list_dsn("SYS1.**.*") +my_dsn_list = my_files.ds.list("SYS1.**.*") datasets = my_dsn_list["items"] for ds in datasets: print(ds["dsname"]) @@ -19,7 +19,7 @@ # ----------------------------------------------------- print("...files in /etc\n") -my_file_list = my_files.list_files("/etc") +my_file_list = my_files.uss.list("/etc") files = my_file_list["items"] for file in files: print(file["name"], file["mode"]) @@ -28,5 +28,5 @@ # Get the content of one of the files. # ----------------------------------------------------- print("...content of a file\n") -my_file_content = my_files.get_file_content("/z/tm891807/file.txt") +my_file_content = my_files.uss.get_content("/z/tm891807/file.txt") print(my_file_content)