Created
December 22, 2020 22:25
-
-
Save K-Mistele/f773df1c0d0eb43e6627bdb790575c7e to your computer and use it in GitHub Desktop.
Using the Bucket API's Exceptions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| try: | |
| bucket = S3.Bucket('my-bucket-name') | |
| data, metadata = bucket.get('some key') | |
| except S3.Exceptions.NoSuchBucket as e: | |
| # some error handling here | |
| pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment