Merge pull request #1029 from coreos-inc/enableecs

Make it explicit that the hostname is a hostname, and not a URL
This commit is contained in:
josephschorr 2015-12-04 15:42:41 -05:00
commit a4f16c443c

View file

@ -402,6 +402,9 @@ class S3Storage(_CloudStorage):
} }
connect_kwargs = {} connect_kwargs = {}
if host: if host:
if host.startswith('http:') or host.startswith('https:'):
raise ValueError('host name must not start with http:// or https://')
connect_kwargs['host'] = host connect_kwargs['host'] = host
super(S3Storage, self).__init__(boto.s3.connection.S3Connection, boto.s3.key.Key, super(S3Storage, self).__init__(boto.s3.connection.S3Connection, boto.s3.key.Key,
connect_kwargs, upload_params, storage_path, s3_access_key, connect_kwargs, upload_params, storage_path, s3_access_key,