Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LOG-7362 Updated message when the S3 bucket is not found. #138

Merged
merged 2 commits into from Oct 9, 2020
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

Updated message when the S3 bucket is not found.

  • Loading branch information
michal.krupa michal.krupa
michal.krupa authored and michal.krupa committed Oct 9, 2020
commit c596f30fdc93e3ea07c7ebcae8b7f4d4c6f2385c
@@ -287,7 +287,8 @@ def get_args():
def get_bucket(session, bucket_name):
bucket = session.resource('s3').Bucket(bucket_name)
if bucket.creation_date is None:
print('S3 bucket {} does not exist, please create it and run the script again'.format(bucket_name))
region = boto3.session.Session().region_name
print('\033[91m', 'S3 bucket {} does not exist, please create it and run the script again. Also, make sure the S3 bucket and the SQS queue are in the same region. Current session region: {}'.format(bucket_name, region))

This comment has been minimized.

@MichalChomo

MichalChomo Oct 9, 2020
Contributor

Could you create a custom print function which adds the color code and swap all prints for that one?

This comment has been minimized.

@swi-michalkrupa

swi-michalkrupa Oct 9, 2020
Author Contributor

Better?

sys.exit(1)
return bucket

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.