From 6730e6a4e575ed4b21eb3fe6b167b34d4d8b08f1 Mon Sep 17 00:00:00 2001 From: Alexander Petric Date: Thu, 5 Feb 2026 10:07:52 -0500 Subject: [PATCH] python clinet to support non 80 ports for s3 (#7812) --- python-client/wmill/wmill/client.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/python-client/wmill/wmill/client.py b/python-client/wmill/wmill/client.py index 4c76844887..8c050f554c 100644 --- a/python-client/wmill/wmill/client.py +++ b/python-client/wmill/wmill/client.py @@ -1088,10 +1088,14 @@ class Windmill: def __boto3_connection_settings(self, s3_resource) -> Boto3ConnectionSettings: endpoint_url_prefix = "https://" if s3_resource["useSSL"] else "http://" + endpoint = s3_resource["endPoint"] + port = s3_resource.get("port") + if port: + endpoint_url = "{}{}:{}".format(endpoint_url_prefix, endpoint, port) + else: + endpoint_url = "{}{}".format(endpoint_url_prefix, endpoint) settings = { - "endpoint_url": "{}{}".format( - endpoint_url_prefix, s3_resource["endPoint"] - ), + "endpoint_url": endpoint_url, "region_name": s3_resource["region"], "use_ssl": s3_resource["useSSL"], "aws_access_key_id": s3_resource["accessKey"],