Fix: adressing style without a default value (#13009)

### What problem does this PR solve?

Fix: adressing style without a default value #12396 #11510

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Magicbook1108
2026-02-05 13:52:23 +08:00
committed by GitHub
parent 6361fc4b33
commit 1349e6b7d1
3 changed files with 3 additions and 2 deletions

View File

@ -315,14 +315,13 @@ def create_s3_client(bucket_type: BlobType, credentials: dict[str, Any], europea
region_name=credentials["region"],
)
elif bucket_type == BlobType.S3_COMPATIBLE:
addressing_style = credentials.get("addressing_style", "virtual")
return boto3.client(
"s3",
endpoint_url=credentials["endpoint_url"],
aws_access_key_id=credentials["aws_access_key_id"],
aws_secret_access_key=credentials["aws_secret_access_key"],
config=Config(s3={'addressing_style': addressing_style}),
config=Config(s3={'addressing_style': credentials["addressing_style"]}),
)
else: