libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [libcloud] 01/03: Only guess host from region map if not explicitly set
Date Fri, 13 Dec 2019 16:27:18 GMT
This is an automated email from the ASF dual-hosted git repository.

tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git

commit 5c04f0049c8f615864ee3082abd2a3de33a6861c
Author: gluap <44007906+gluap@users.noreply.github.com>
AuthorDate: Fri Dec 13 11:55:00 2019 +0100

    Only guess host from region map if not explicitly set
    
    Overwriting host parameter is inconsistent with function signature and a breaking change
compared with previous behaviour
---
 libcloud/storage/drivers/s3.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libcloud/storage/drivers/s3.py b/libcloud/storage/drivers/s3.py
index 0b0e063..e18ab79 100644
--- a/libcloud/storage/drivers/s3.py
+++ b/libcloud/storage/drivers/s3.py
@@ -1050,7 +1050,9 @@ class S3StorageDriver(AWSDriver, BaseS3StorageDriver):
 
         self.name = 'Amazon S3 (%s)' % (region)
 
-        host = REGION_TO_HOST_MAP[region]
+        if host is None:
+            host = REGION_TO_HOST_MAP[region]
+
         super(S3StorageDriver, self).__init__(key=key, secret=secret,
                                               secure=secure, host=host,
                                               port=port,


Mime
View raw message