Bobby R. Bruce has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/51370 )

Change subject: python: Improve the print statements in downloader.py
......................................................................

python: Improve the print statements in downloader.py

Most importantly, these print statements now make clear to the user
where the resources are being downloaded to.

Change-Id: Id2661d2567a7ea5ee3157142dc91e814e3e2edaf
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51370
Reviewed-by: Bobby R. Bruce <bbr...@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbr...@ucdavis.edu>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/python/gem5/resources/downloader.py
1 file changed, 31 insertions(+), 4 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/python/gem5/resources/downloader.py b/src/python/gem5/resources/downloader.py
index 28f813d..f05d9d0 100644
--- a/src/python/gem5/resources/downloader.py
+++ b/src/python/gem5/resources/downloader.py
@@ -274,19 +274,30 @@

# TODO: Might be nice to have some kind of download status bar here.
         # TODO: There might be a case where this should be silenced.
- print("'{}' not found locally. Downloading...".format(resource_name))
+        print(
+            "Resource '{}' was not found locally. Downloading to '{}'..."
+            .format(
+                resource_name, download_dest
+            )
+        )

# Get the URL. The URL may contain '{url_base}' which needs replaced
         # with the correct value.
         url = resource_json["url"].format(url_base=_get_url_base())

         _download(url=url, download_to=download_dest)
-        print("Finished downloading '{}'.".format(resource_name))
+        print("Finished downloading resource '{}'.".format(resource_name))

         if run_unzip:
-            print("Decompressing '{}'...".format(resource_name))
+            print(
+                "Decompressing resource '{}' ('{}')...".format(
+                    resource_name, download_dest
+                )
+            )
             with gzip.open(download_dest, "rb") as f:
                 with open(to_path, "wb") as o:
                     shutil.copyfileobj(f, o)
             os.remove(download_dest)
-            print("Finished decompressing '{}.".format(resource_name))
+            print(
+ "Finished decompressing resource '{}'.".format(resource_name)
+            )

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51370
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Id2661d2567a7ea5ee3157142dc91e814e3e2edaf
Gerrit-Change-Number: 51370
Gerrit-PatchSet: 5
Gerrit-Owner: Bobby R. Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Bobby R. Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to