Skip to content

Commit

Permalink
Ignore permissions errors as well as lack of permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
bkirwi committed Oct 20, 2023
1 parent 41e031a commit cf4c296
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion misc/python/materialize/mzbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

import boto3
import yaml
from botocore.exceptions import NoCredentialsError
from botocore.exceptions import ClientError, NoCredentialsError

from materialize import cargo, git, rustc_flags, spawn, ui, xcompile
from materialize.elf import get_build_id
Expand Down Expand Up @@ -272,6 +272,13 @@ def run(self) -> None:
except NoCredentialsError:
print("Failed to find S3 credentials; not uploading build.")
return
except ClientError as err:
if err.response["Error"]["Code"] == "AccessDenied":
print("Incorrect S3 credentials; not uploading build.")
return
else:
raise err

print(
f"Attempting to upload debug info to s3://{self.bucket}/{dbg_object_name}"
)
Expand Down

0 comments on commit cf4c296

Please sign in to comment.