Skip to content

Commit f5c30bf

Browse files
committed
Use meanful variable name
1 parent e9f8dbb commit f5c30bf

1 file changed

Lines changed: 6 additions & 12 deletions

File tree

baidupcs_py/commands/upload.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -421,21 +421,18 @@ def callback_for_slice(idx: int, monitor: MultipartEncoderMonitor):
421421
slice256k_md5 = ""
422422
content_md5 = ""
423423
content_crc32 = 0
424-
io_len = 0
425424

426425
if encrypt_type == EncryptType.No and encrypt_io_len > 256 * constant.OneK:
427426
# Rapid Upload
428-
slice256k_md5, content_md5, content_crc32, io_len = rapid_upload_params(
429-
encrypt_io
430-
)
427+
slice256k_md5, content_md5, content_crc32, _ = rapid_upload_params(encrypt_io)
431428
ok = _rapid_upload(
432429
api,
433430
localpath,
434431
remotepath,
435432
slice256k_md5,
436433
content_md5,
437434
content_crc32,
438-
io_len,
435+
encrypt_io_len,
439436
local_ctime,
440437
local_mtime,
441438
ondup,
@@ -532,7 +529,7 @@ def upload_slice(item: Tuple[int, IO]):
532529
slice256k_md5,
533530
content_md5,
534531
content_crc32,
535-
io_len,
532+
encrypt_io_len,
536533
encrypt_password=encrypt_password,
537534
encrypt_type=encrypt_type.value,
538535
user_id=user_id,
@@ -676,21 +673,18 @@ def callback_for_slice(monitor: MultipartEncoderMonitor):
676673
slice256k_md5 = ""
677674
content_md5 = ""
678675
content_crc32 = 0
679-
io_len = 0
680676

681677
if encrypt_type == EncryptType.No and encrypt_io_len > 256 * constant.OneK:
682678
# Rapid Upload
683-
slice256k_md5, content_md5, content_crc32, io_len = rapid_upload_params(
684-
encrypt_io
685-
)
679+
slice256k_md5, content_md5, content_crc32, _ = rapid_upload_params(encrypt_io)
686680
ok = _rapid_upload(
687681
api,
688682
localpath,
689683
remotepath,
690684
slice256k_md5,
691685
content_md5,
692686
content_crc32,
693-
io_len,
687+
encrypt_io_len,
694688
local_ctime,
695689
local_mtime,
696690
ondup,
@@ -774,7 +768,7 @@ def callback_for_slice(monitor: MultipartEncoderMonitor):
774768
slice256k_md5,
775769
content_md5,
776770
content_crc32,
777-
io_len,
771+
encrypt_io_len,
778772
encrypt_password=encrypt_password,
779773
encrypt_type=encrypt_type.value,
780774
user_id=user_id,

0 commit comments

Comments
 (0)