Skip to content

Commit c93ea9a

Browse files
authored
Merge pull request #287 from CoderWanFeng/master
替换warn方法名为warning
2 parents 4a3a73d + b3a4fd6 commit c93ea9a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

qcloud_cos/cos_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ def send_request(self, method, url, bucket=None, timeout=30, cos_request=True, c
453453
info['requestid'] = res.headers['x-cos-request-id']
454454
if 'x-cos-trace-id' in res.headers:
455455
info['traceid'] = res.headers['x-cos-trace-id']
456-
logger.warn(info)
456+
logger.warning(info)
457457
if len(exception_logbuf) > 0:
458458
logger.exception(exception_logbuf) # 最终重试失败, 输出前几次重试失败的exception
459459
raise CosServiceError(method, info, res.status_code)

qcloud_cos/crypto.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def __init__(self, key_pair_info=None, cipher=AESCTRCipher(), passphrase=None):
202202

203203
# 为用户自动创建rsa
204204
if self.__encrypt_obj is None and self.__decrypt_obj is None:
205-
logger.warn('fail to get rsa key, will generate key')
205+
logger.warning('fail to get rsa key, will generate key')
206206
private_key = RSA.generate(2048)
207207
public_key = private_key.publickey()
208208

@@ -302,7 +302,7 @@ def init_ed_obj(self):
302302
self.__ed_obj = AES.new(aes_key, AES.MODE_CTR, counter=self.__my_counter)
303303

304304
if self.__ed_obj is None:
305-
logger.warn('fail to get aes key, will generate key')
305+
logger.warning('fail to get aes key, will generate key')
306306
aes_key = random_key(_AES_256_KEY_SIZE)
307307
self.__ed_obj = AES.new(aes_key, AES.MODE_CTR, counter=self.__my_counter)
308308
if not os.path.exists(default_aes_dir):

0 commit comments

Comments
 (0)