Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Fix an error when incomplete S3Client is destroyed If an error occurs during initialization of the S3Client instance, the initializer for the Client superclass is never called. This could happen, for example, when the S3Client has a bad profile name passed which botocore doesn't understand. When the remainder of the class is garbage collected (for example, at interpreter shutdown), Python calls the __del__ method of the Client superclass. The specific error is that the file_cache_mode attribute is not set because the superclass initializer is not called in the S3Client initializer if an error occurs during S3 session setup. This change uses getattr with a default value to avoid the AttributeError in the __del__ method. * Update history file Co-authored-by: Bryan Weber <bryan.w.weber@gmail.com>
- Loading branch information