summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual/python-development-shell.rst
diff options
context:
space:
mode:
authorEtienne Cordonnier <ecordonnier@snap.com>2024-08-23 10:41:08 +0200
committerSteve Sakoman <steve@sakoman.com>2025-06-11 08:17:34 -0700
commit4bca6762e5baa7c8cb90b4f2f13f4cb3e2e9942e (patch)
tree82386bc14434f52bcf6e6a24dad8e2ca32a9f998 /documentation/dev-manual/python-development-shell.rst
parent9b0e95db584602a13e46ed86b73930506b13e4a9 (diff)
downloadpoky-4bca6762e5baa7c8cb90b4f2f13f4cb3e2e9942e.tar.gz
bitbake: gcp.py: remove slow calls to gsutil stat
The changes of 1ab1d36c0af6fc58a974106b61ff4d37da6cb229 added calls to "gsutil stat" to avoid unhandled exceptions, however: - in the case of checkstatus() this is redundant with the call to self.gcp_client.bucket(ud.host).blob(path).exists() which already returns True/False and does not throw an exception in case the file does not exist. - Also the call to gsutil stat is much slower than using the python client to call exists() so we should not replace the call to exists() with a call to gsutil stat. - I think the intent of calling check_network_access in checkstatus() was to error-out in case the error is disabled. We can rather change the string "gsutil stat" to something else to make the code more readable. - add a try/except block in download() instead of the extra call to gsutil [RP: Tweak to avoid import until needed so google module isn't required for everyone] (Bitbake rev: 59df5390381792aba4f3f5185000adf5109267fb) Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'documentation/dev-manual/python-development-shell.rst')
0 files changed, 0 insertions, 0 deletions