File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
localstack-core/localstack/services/s3 Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -701,14 +701,15 @@ def get_bucket_location(
701701 Botocore implements this hack for parsing the response in `botocore.handlers.py#parse_get_bucket_location`
702702 """
703703 store , s3_bucket = self ._get_cross_account_bucket (context , bucket )
704- bucket_region = s3_bucket .bucket_region
705704
706705 # TODO: Remove usage of getattr once persistence mechanism is updated.
707706 # If the stored constraint is None the bucket was made before the storage of location_constraint.
708707 # The EU location constraint wasn't supported before this point so we can safely default to the region.
709708 location_constraint = getattr (s3_bucket , "location_constraint" , None )
710709 if location_constraint is None :
711- location_constraint = bucket_region if bucket_region != "us-east-1" else ""
710+ location_constraint = (
711+ s3_bucket .bucket_region if s3_bucket .bucket_region != "us-east-1" else ""
712+ )
712713
713714 return GetBucketLocationOutput (
714715 LocationConstraint = get_bucket_location_xml (location_constraint )
You can’t perform that action at this time.
0 commit comments