Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
libertyzhu committed Oct 14, 2024
2 parents f541868 + c93ea9a commit b0825fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion qcloud_cos/cos_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def send_request(self, method, url, bucket=None, timeout=30, cos_request=True, c
info['requestid'] = res.headers['x-cos-request-id']
if 'x-cos-trace-id' in res.headers:
info['traceid'] = res.headers['x-cos-trace-id']
logger.warn(info)
logger.warning(info)
if len(exception_logbuf) > 0:
logger.exception(exception_logbuf) # 最终重试失败, 输出前几次重试失败的exception
raise CosServiceError(method, info, res.status_code)
Expand Down
4 changes: 2 additions & 2 deletions qcloud_cos/crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def __init__(self, key_pair_info=None, cipher=AESCTRCipher(), passphrase=None):

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

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

if self.__ed_obj is None:
logger.warn('fail to get aes key, will generate key')
logger.warning('fail to get aes key, will generate key')
aes_key = random_key(_AES_256_KEY_SIZE)
self.__ed_obj = AES.new(aes_key, AES.MODE_CTR, counter=self.__my_counter)
if not os.path.exists(default_aes_dir):
Expand Down

0 comments on commit b0825fa

Please sign in to comment.