From 5f6be6cdcb4fd8a9203215c7dcafbb53038d2141 Mon Sep 17 00:00:00 2001 From: Vitalii Koshura Date: Tue, 1 Jun 2021 22:57:54 +0200 Subject: [PATCH] [vcpkg] Fix vcpkg cache upload to s3 Signed-off-by: Vitalii Koshura --- deploy/manage_vcpkg_archive_cache.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deploy/manage_vcpkg_archive_cache.py b/deploy/manage_vcpkg_archive_cache.py index c583566223..0a8b29f096 100644 --- a/deploy/manage_vcpkg_archive_cache.py +++ b/deploy/manage_vcpkg_archive_cache.py @@ -18,6 +18,8 @@ def s3_upload(local_file, s3_file, bucket, access_key, secret_key): print("The file was not found") except NoCredentialsError: print("Credentials not available") + except Exception: + print("Upload failed") def s3_download(local_file, s3_file, bucket): print('Downloading', s3_file, '->', local_file) @@ -26,10 +28,10 @@ def s3_download(local_file, s3_file, bucket): try: s3.download_file(bucket, s3_file, local_file) print("Download Successful") - return True except NoCredentialsError: print("Credentials not available") - return False + except Exception: + print("Download failed") def s3_list(bucket): s3 = boto3.client('s3', config=Config(signature_version=UNSIGNED))