Exemple #1
0
 def upgrade(self):
     super(S3Storage, self).upgrade()
     try:
         s3.create_bucket(self.s3, self._bucket_name, self._region_name)
     except botocore.exceptions.ClientError as e:
         if e.response['Error'].get('Code') != "BucketAlreadyExists":
             raise
Exemple #2
0
 def upgrade(self):
     super(S3Storage, self).upgrade()
     try:
         s3.create_bucket(self.s3, self._bucket_name, self._region_name)
     except botocore.exceptions.ClientError as e:
         if e.response['Error'].get('Code') != "BucketAlreadyExists":
             raise
Exemple #3
0
 def upgrade(self, num_sacks):
     try:
         s3.create_bucket(self.s3, self._bucket_name_measures,
                          self._region_name)
     except botocore.exceptions.ClientError as e:
         if e.response['Error'].get('Code') not in (
                 "BucketAlreadyExists", "BucketAlreadyOwnedByYou"):
             raise
     # need to create bucket first to store storage settings object
     super(S3Storage, self).upgrade(num_sacks)
Exemple #4
0
 def upgrade(self, num_sacks):
     try:
         s3.create_bucket(self.s3, self._bucket_name_measures,
                          self._region_name)
     except botocore.exceptions.ClientError as e:
         if e.response['Error'].get('Code') not in (
                 "BucketAlreadyExists", "BucketAlreadyOwnedByYou"
         ):
             raise
     # need to create bucket first to store storage settings object
     super(S3Storage, self).upgrade(num_sacks)