Commits

Nathan Duthoit committed 73ffc99

Replaced S3ResponseError by connection.provider.storage_response_error (for boto 2.0)

  • Participants
  • Parent commits ae2572e

Comments (0)

Files changed (1)

File storages/backends/s3boto.py

 from django.utils.encoding import force_unicode, smart_str
 
 try:
-    from boto.s3.connection import S3Connection, S3ResponseError
+    from boto.s3.connection import S3Connection
     from boto.s3.key import Key
 except ImportError:
     raise ImproperlyConfigured, "Could not load Boto's S3 bindings.\
         """Retrieves a bucket if it exists, otherwise creates it."""
         try:
             return self.connection.get_bucket(name)
-        except S3ResponseError, e:
+        except self.connection.provider.storage_response_error, e:
             if AUTO_CREATE_BUCKET:
                 bucket = self.connection.create_bucket(name)
                 bucket.set_acl(self.bucket_acl)