mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-05-30 03:03:07 +03:00
Remove unnecessary offset_index variable on .download_file
This commit is contained in:
parent
6f1c05633e
commit
a7622324dd
|
@ -688,10 +688,8 @@ class TelegramBareClient:
|
||||||
cdn_decrypter = None
|
cdn_decrypter = None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
offset_index = 0
|
offset = 0
|
||||||
while True:
|
while True:
|
||||||
offset = offset_index * part_size
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if cdn_decrypter:
|
if cdn_decrypter:
|
||||||
result = cdn_decrypter.get_file()
|
result = cdn_decrypter.get_file()
|
||||||
|
@ -710,7 +708,7 @@ class TelegramBareClient:
|
||||||
client = self._get_exported_client(e.new_dc)
|
client = self._get_exported_client(e.new_dc)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
offset_index += 1
|
offset += part_size
|
||||||
|
|
||||||
# If we have received no data (0 bytes), the file is over
|
# If we have received no data (0 bytes), the file is over
|
||||||
# So there is nothing left to download and write
|
# So there is nothing left to download and write
|
||||||
|
|
Loading…
Reference in New Issue
Block a user