Skip to content

Commit 25a60bf

Browse files
authored
Merge pull request #179 from zhy1985555/master
使用coscmd+全球加速时报错
2 parents 79f35de + 1b09ac8 commit 25a60bf

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

qcloud_cos/cos_client.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,11 @@ def __init__(self, Appid=None, Region=None, SecretId=None, SecretKey=None, Token
9393
if (Scheme != u'http' and Scheme != u'https'):
9494
raise CosClientError('Scheme can be only set to http/https')
9595
self._scheme = Scheme
96-
# 格式化ci的endpoint 不支持自定义域名的
97-
self._endpoint_ci = format_endpoint(EndpointCi, Region, u'ci.')
96+
97+
# 客户使用全球加速域名时,只会传endpoint不会传region。此时这样endpointCi和region同时为None,就会报错。
98+
if EndpointCi is not None:
99+
# 格式化ci的endpoint 不支持自定义域名的
100+
self._endpoint_ci = format_endpoint(EndpointCi, Region, u'ci.')
98101

99102
# 兼容(SecretId,SecretKey)以及(AccessId,AccessKey)
100103
if (SecretId and SecretKey):

qcloud_cos/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '5.1.9.9'
1+
__version__ = '5.1.9.10'

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def long_description():
1616

1717
setup(
1818
name='cos-python-sdk-v5',
19-
version='1.9.9',
19+
version='1.9.10',
2020
url='https://www.qcloud.com/',
2121
license='MIT',
2222
author='tiedu, lewzylu, channingliu',

0 commit comments

Comments
 (0)